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
28 BuildRequires: libsatsolver-devel >= 0.12.1 openssl-devel
29 BuildRequires: boost-devel curl-devel dejagnu doxygen gcc-c++ gettext-devel graphviz hal-devel libxml2-devel
32 BuildRequires: libexpat-devel
34 BuildRequires: expat-devel
38 BuildRequires: hicolor-icon-theme update-desktop-files rpm-devel
39 Requires: uuid-runtime
42 %if 0%{?fedora_version}
43 BuildRequires: glib2-devel popt-devel dbus-glib-devel rpm-devel
46 %if 0%{?mandriva_version}
47 BuildRequires: glib2-devel
48 BuildRequires: librpm-devel
60 %requires_eq satsolver-tools
63 Package, Patch, Pattern, and Product Management
67 Michael Andres <ma@suse.de>
68 Jiri Srain <jsrain@suse.cz>
69 Stefan Schubert <schubi@suse.de>
70 Duncan Mac-Vicar <dmacvicar@suse.de>
71 Klaus Kaempf <kkaempf@suse.de>
72 Marius Tomaschewski <mt@suse.de>
73 Stanislav Visnovsky <visnov@suse.cz>
74 Ladislav Slezak <lslezak@suse.cz>
77 Requires: libzypp == @VERSION@
78 Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
79 Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
80 Requires: cmake libsatsolver-devel >= 0.10.14
81 Summary: Package, Patch, Pattern, and Product Management - developers files
82 Group: System/Packages
83 Provides: yast2-packagemanager-devel
84 Obsoletes: yast2-packagemanager-devel
86 %description -n libzypp-devel
87 Package, Patch, Pattern, and Product Management - developers files
91 Michael Andres <ma@suse.de>
92 Jiri Srain <jsrain@suse.cz>
93 Stefan Schubert <schubi@suse.de>
94 Duncan Mac-Vicar <dmacvicar@suse.de>
95 Klaus Kaempf <kkaempf@suse.de>
96 Marius Tomaschewski <mt@suse.de>
97 Stanislav Visnovsky <visnov@suse.cz>
98 Ladislav Slezak <lslezak@suse.cz>
106 export CFLAGS="$RPM_OPT_FLAGS"
107 export CXXFLAGS="$CFLAGS"
108 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
109 -DDOC_INSTALL_DIR=%{_docdir} \
111 -DCMAKE_BUILD_TYPE=Release \
112 -DCMAKE_SKIP_RPATH=1 \
114 make %{?jobs:-j %jobs} VERBOSE=1
115 make -C doc/autodoc %{?jobs:-j %jobs}
116 make -C po %{?jobs:-j %jobs} translations
121 rm -rf "$RPM_BUILD_ROOT"
123 make install DESTDIR=$RPM_BUILD_ROOT
124 make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT
125 mkdir -p $RPM_BUILD_ROOT/etc/zypp/repos.d
126 mkdir -p $RPM_BUILD_ROOT/etc/zypp/services.d
127 mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/zypp
128 mkdir -p $RPM_BUILD_ROOT/%{_var}/log/zypp
129 mkdir -p $RPM_BUILD_ROOT/%{_var}/cache/zypp
131 %if 0%{?suse_version}
132 %suse_update_desktop_file -G "" -C "" package-manager
135 make -C po install DESTDIR=$RPM_BUILD_ROOT
136 # Create filelist with translations
143 if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
144 #%{prefix}/lib/zypp/zypp-migrate-sources
146 # convert old lock file to new
147 # TODO make this a separate file?
148 # TODO run the sript only when updating form pre-11.0 libzypp versions
149 LOCKSFILE=/etc/zypp/locks
150 OLDLOCKSFILE=/etc/zypp/locks.old
154 cat ${LOCKSFILE} | sed '/^\#.*/ d;/.*:.*/d;/^[^[a-zA-Z\*?.0-9]*$/d' > ${TEMP_FILE}
155 if [ -s ${TEMP_FILE} ]
195 if is_old ${LOCKSFILE}
197 mv -f ${LOCKSFILE} ${OLDLOCKSFILE} || die "cannot backup old locks"
198 cat ${OLDLOCKSFILE}| sed "/^\#.*/d"| while read line
200 append_new_lock $line
209 rm -rf "$RPM_BUILD_ROOT"
212 %defattr(-,root,root)
214 %dir /etc/zypp/repos.d
215 %dir /etc/zypp/services.d
216 %config(noreplace) /etc/zypp/zypp.conf
217 %config(noreplace) /etc/zypp/systemCheck
218 %config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr
219 %dir %{_var}/lib/zypp
220 %dir %{_var}/log/zypp
221 %dir %{_var}/cache/zypp
223 %{prefix}/share/applications/package-manager.desktop
224 %{prefix}/share/icons/hicolor/scalable/apps/package-manager-icon.svg
225 %{prefix}/share/icons/hicolor/16x16/apps/package-manager-icon.png
226 %{prefix}/share/icons/hicolor/22x22/apps/package-manager-icon.png
227 %{prefix}/share/icons/hicolor/24x24/apps/package-manager-icon.png
228 %{prefix}/share/icons/hicolor/32x32/apps/package-manager-icon.png
229 %{prefix}/share/icons/hicolor/48x48/apps/package-manager-icon.png
230 %{prefix}/bin/package-manager
231 %{prefix}/bin/package-manager-su
232 %{_libdir}/libzypp*so.*
233 %doc %_mandir/man5/locks.5.*
236 %defattr(-,root,root)
237 %{_libdir}/libzypp.so
239 %{prefix}/include/zypp
240 %{prefix}/share/cmake/Modules/*
241 %{_libdir}/pkgconfig/libzypp.pc