2 # spec file for package libzypp
4 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
8 # Please submit bugfixes or comments via http://bugs.opensuse.org/
14 License: GPL v2 or later
15 Group: System/Packages
16 BuildRoot: %{_tmppath}/%{name}-%{version}-build
18 Summary: Package, Patch, Pattern, and Product Management
21 Source: @PACKAGE@-@VERSION@.tar.bz2
22 Source1: @PACKAGE@-rpmlintrc
24 Provides: yast2-packagemanager
25 Obsoletes: yast2-packagemanager
27 BuildRequires: libsatsolver-devel >= 0.0.26 openssl-devel
28 BuildRequires: boost-devel curl-devel dejagnu doxygen gcc-c++ gettext-devel graphviz hal-devel libxml2-devel
31 BuildRequires: hicolor-icon-theme update-desktop-files rpm-devel
34 %if 0%{?fedora_version}
35 BuildRequires: glib2-devel popt-devel dbus-glib-devel rpm-devel
38 %if 0%{?mandriva_version}
39 BuildRequires: glib2-devel
40 BuildRequires: librpm-devel
51 Requires: satsolver-tools == %( echo `rpm -q --queryformat '%{VERSION}' satsolver-tools`)
54 Package, Patch, Pattern, and Product Management
58 Michael Andres <ma@suse.de>
59 Jiri Srain <jsrain@suse.cz>
60 Stefan Schubert <schubi@suse.de>
61 Duncan Mac-Vicar <dmacvicar@suse.de>
62 Klaus Kaempf <kkaempf@suse.de>
63 Marius Tomaschewski <mt@suse.de>
64 Stanislav Visnovsky <visnov@suse.cz>
65 Ladislav Slezak <lslezak@suse.cz>
68 Requires: libzypp == @VERSION@
69 Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
70 Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
71 Requires: cmake libsatsolver-devel
72 Summary: Package, Patch, Pattern, and Product Management - developers files
73 Group: System/Packages
74 Provides: yast2-packagemanager-devel
75 Obsoletes: yast2-packagemanager-devel
77 %description -n libzypp-devel
78 Package, Patch, Pattern, and Product Management - developers files
82 Michael Andres <ma@suse.de>
83 Jiri Srain <jsrain@suse.cz>
84 Stefan Schubert <schubi@suse.de>
85 Duncan Mac-Vicar <dmacvicar@suse.de>
86 Klaus Kaempf <kkaempf@suse.de>
87 Marius Tomaschewski <mt@suse.de>
88 Stanislav Visnovsky <visnov@suse.cz>
89 Ladislav Slezak <lslezak@suse.cz>
97 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
98 -DDOC_INSTALL_DIR=%{_docdir} \
100 -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
101 -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
102 -DCMAKE_BUILD_TYPE=Release \
103 -DCMAKE_SKIP_RPATH=1 \
105 make %{?jobs:-j %jobs} VERBOSE=1
106 make -C doc/autodoc %{?jobs:-j %jobs}
107 make -C po %{?jobs:-j %jobs} translations
112 rm -rf "$RPM_BUILD_ROOT"
114 make install DESTDIR=$RPM_BUILD_ROOT
115 make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT
116 mkdir -p $RPM_BUILD_ROOT/etc/zypp/repos.d
117 mkdir -p $RPM_BUILD_ROOT/etc/zypp/products.d
119 %if 0%{?suse_version}
120 %suse_update_desktop_file -G "" -C "" package-manager
123 make -C po install DESTDIR=$RPM_BUILD_ROOT
124 # Create filelist with translations
131 if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
132 #%{prefix}/lib/zypp/zypp-migrate-sources
134 # convert old lock file to new
135 # TODO make this a separate file?
136 # TODO run the sript only when updating form pre-11.0 libzypp versions
137 LOCKSFILE=/etc/zypp/locks
138 OLDLOCKSFILE=/etc/zypp/locks.old
142 cat ${LOCKSFILE} | sed '/^\#.*/ d;/.*:.*/d;/^[^[a-zA-Z\*?.0-9]*$/d' > ${TEMP_FILE}
143 if [ -s ${TEMP_FILE} ]
183 if is_old ${LOCKSFILE}
185 mv -f ${LOCKSFILE} ${OLDLOCKSFILE} || die "cannot backup old locks"
186 cat ${OLDLOCKSFILE}| sed "/^\#.*/d"| while read line
188 append_new_lock $line
197 rm -rf "$RPM_BUILD_ROOT"
200 %defattr(-,root,root)
202 %dir /etc/zypp/repos.d
203 %dir /etc/zypp/products.d
204 %config(noreplace) /etc/zypp/zypp.conf
207 %{prefix}/share/applications/package-manager.desktop
208 %{prefix}/share/icons/hicolor/scalable/apps/package-manager-icon.svg
209 %{prefix}/share/icons/hicolor/16x16/apps/package-manager-icon.png
210 %{prefix}/share/icons/hicolor/32x32/apps/package-manager-icon.png
211 %{prefix}/share/icons/hicolor/48x48/apps/package-manager-icon.png
212 %{prefix}/bin/package-manager
213 %{prefix}/bin/package-manager-su
214 %{_libdir}/libzypp*so.*
215 %doc %_mandir/man5/locks.5.*
218 %defattr(-,root,root)
219 %{_libdir}/libzypp.so
220 #%dir %{_libdir}/libzypp.la
222 %dir %{prefix}/include/zypp
223 %{prefix}/include/zypp/*
224 %{prefix}/share/cmake/Modules/*
225 %{_libdir}/pkgconfig/libzypp.pc