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.10.13 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
32 Requires: uuid-runtime
35 %if 0%{?fedora_version}
36 BuildRequires: glib2-devel popt-devel dbus-glib-devel rpm-devel
39 %if 0%{?mandriva_version}
40 BuildRequires: glib2-devel
41 BuildRequires: librpm-devel
54 Requires: satsolver-tools == %( echo `rpm -q --queryformat '%{VERSION}' satsolver-tools`)
57 Package, Patch, Pattern, and Product Management
61 Michael Andres <ma@suse.de>
62 Jiri Srain <jsrain@suse.cz>
63 Stefan Schubert <schubi@suse.de>
64 Duncan Mac-Vicar <dmacvicar@suse.de>
65 Klaus Kaempf <kkaempf@suse.de>
66 Marius Tomaschewski <mt@suse.de>
67 Stanislav Visnovsky <visnov@suse.cz>
68 Ladislav Slezak <lslezak@suse.cz>
71 Requires: libzypp == @VERSION@
72 Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
73 Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
74 Requires: cmake libsatsolver-devel >= 0.10.14
76 Summary: Package, Patch, Pattern, and Product Management - developers files
77 Group: System/Packages
78 Provides: yast2-packagemanager-devel
79 Obsoletes: yast2-packagemanager-devel
81 %description -n libzypp-devel
82 Package, Patch, Pattern, and Product Management - developers files
86 Michael Andres <ma@suse.de>
87 Jiri Srain <jsrain@suse.cz>
88 Stefan Schubert <schubi@suse.de>
89 Duncan Mac-Vicar <dmacvicar@suse.de>
90 Klaus Kaempf <kkaempf@suse.de>
91 Marius Tomaschewski <mt@suse.de>
92 Stanislav Visnovsky <visnov@suse.cz>
93 Ladislav Slezak <lslezak@suse.cz>
101 export CFLAGS="$RPM_OPT_FLAGS"
102 export CXXFLAGS="$CFLAGS"
103 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
104 -DDOC_INSTALL_DIR=%{_docdir} \
106 -DCMAKE_BUILD_TYPE=Release \
107 -DCMAKE_SKIP_RPATH=1 \
109 make %{?jobs:-j %jobs} VERBOSE=1
110 make -C doc/autodoc %{?jobs:-j %jobs}
111 make -C po %{?jobs:-j %jobs} translations
116 rm -rf "$RPM_BUILD_ROOT"
118 make install DESTDIR=$RPM_BUILD_ROOT
119 make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT
120 mkdir -p $RPM_BUILD_ROOT/etc/zypp/repos.d
121 mkdir -p $RPM_BUILD_ROOT/etc/zypp/products.d
122 mkdir -p $RPM_BUILD_ROOT/etc/zypp/services.d
123 mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/zypp
124 mkdir -p $RPM_BUILD_ROOT/%{_var}/log/zypp
125 mkdir -p $RPM_BUILD_ROOT/%{_var}/cache/zypp
127 %if 0%{?suse_version}
128 %suse_update_desktop_file -G "" -C "" package-manager
131 make -C po install DESTDIR=$RPM_BUILD_ROOT
132 # Create filelist with translations
139 if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
140 #%{prefix}/lib/zypp/zypp-migrate-sources
142 # convert old lock file to new
143 # TODO make this a separate file?
144 # TODO run the sript only when updating form pre-11.0 libzypp versions
145 LOCKSFILE=/etc/zypp/locks
146 OLDLOCKSFILE=/etc/zypp/locks.old
150 cat ${LOCKSFILE} | sed '/^\#.*/ d;/.*:.*/d;/^[^[a-zA-Z\*?.0-9]*$/d' > ${TEMP_FILE}
151 if [ -s ${TEMP_FILE} ]
191 if is_old ${LOCKSFILE}
193 mv -f ${LOCKSFILE} ${OLDLOCKSFILE} || die "cannot backup old locks"
194 cat ${OLDLOCKSFILE}| sed "/^\#.*/d"| while read line
196 append_new_lock $line
205 rm -rf "$RPM_BUILD_ROOT"
208 %defattr(-,root,root)
210 %dir /etc/zypp/repos.d
211 %config(noreplace) /etc/zypp/zypp.conf
212 %config(noreplace) /etc/zypp/systemCheck
213 %dir %{_var}/lib/zypp
214 %dir %{_var}/log/zypp
215 %dir %{_var}/cache/zypp
218 %{prefix}/share/applications/package-manager.desktop
219 %{prefix}/share/icons/hicolor/scalable/apps/package-manager-icon.svg
220 %{prefix}/share/icons/hicolor/16x16/apps/package-manager-icon.png
221 %{prefix}/share/icons/hicolor/22x22/apps/package-manager-icon.png
222 %{prefix}/share/icons/hicolor/24x24/apps/package-manager-icon.png
223 %{prefix}/share/icons/hicolor/32x32/apps/package-manager-icon.png
224 %{prefix}/share/icons/hicolor/48x48/apps/package-manager-icon.png
225 %{prefix}/bin/package-manager
226 %{prefix}/bin/package-manager-su
227 %{_libdir}/libzypp*so.*
228 %doc %_mandir/man5/locks.5.*
229 %{_sysconfdir}/logrotate.d/zypp-history.lr
232 %defattr(-,root,root)
233 %{_libdir}/libzypp.so
235 %{prefix}/include/zypp
236 %{prefix}/share/cmake/Modules/*
237 %{_libdir}/pkgconfig/libzypp.pc