# Copyright (c) 2011 T.C. Hollingsworth # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. Name: libzypp # license permits linking against OpenSSL License: GPLv2+ with exceptions BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Summary: Package, Patch, Pattern, and Product Management Version: 9.10.1 Release: 2%{?dist} # downloaded from https://github.com/openSUSE/libzypp/tarball/f092b9447fe5feeb96eb301a6bde9c575ab110c1 Source: %{name}-%{version}.tar.bz2 Url: http://en.opensuse.org/Portal:Libzypp # move /usr/lib/zypp/notify-messages shell script to /usr/libexec Patch1: %{name}-%{version}-libexec.patch BuildRequires: cmake BuildRequires: openssl-devel BuildRequires: libudev-devel BuildRequires: boost-devel BuildRequires: dejagnu BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: graphviz BuildRequires: libxml2-devel BuildRequires: libproxy-devel BuildRequires: expat-devel BuildRequires: glib2-devel BuildRequires: popt-devel BuildRequires: rpm-devel BuildRequires: ruby BuildRequires: satsolver-devel Requires: satsolver BuildRequires: libcurl-devel >= 7.19.4 Requires: libcurl >= 7.19.4 Requires: libzypp-config %description ZYpp is a software management library that powers products like YaST and zypper with a powerful dependency resolver and a convienent package management API. It supports the RPM package format as well as repomd (YUM), YaST2, and susetags repositories. %package devel License: GPLv2+ with exceptions Requires: libzypp = %{version} Requires: libxml2-devel Requires: openssl-devel Requires: rpm-devel Requires: glibc-devel Requires: zlib-devel Requires: bzip2 Requires: popt-devel Requires: boost-devel Requires: libstdc++-devel Requires: libudev-devel Requires: cmake Requires: libcurl-devel >= 7.19.4 Requires: satsolver-devel Summary: Package, Patch, Pattern, and Product Management - developer files %description -n libzypp-devel zyPP is a software management library that powers products like YaST and zypper with a powerful dependency resolver and a convienent package management API. It supports the RPM package format as well as repomd (YUM), YaST2, and susetags repositories. This package contains development headers and documentation. %prep %setup -q %patch1 -p0 %build mkdir build cd build export CFLAGS="$RPM_OPT_FLAGS" export CXXFLAGS="$RPM_OPT_FLAGS" cmake -DCMAKE_INSTALL_PREFIX=%{_usr} \ -DDOC_INSTALL_DIR=%{_docdir} \ -DLIB=%{_lib} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=1 \ .. make %{?_smp_mflags} VERBOSE=1 make -C doc/autodoc %{?_smp_mflags} make -C po %{?_smp_mflags} translations %install rm -rf "$RPM_BUILD_ROOT" pushd build make install DESTDIR=$RPM_BUILD_ROOT make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zypp/services.d mkdir -p $RPM_BUILD_ROOT%{_libdir}/zypp mkdir -p $RPM_BUILD_ROOT%{_libdir}/zypp/plugins mkdir -p $RPM_BUILD_ROOT%{_libdir}/zypp/plugins/commit mkdir -p $RPM_BUILD_ROOT%{_libdir}/zypp/plugins/services mkdir -p $RPM_BUILD_ROOT%{_libdir}/zypp/plugins/system mkdir -p $RPM_BUILD_ROOT%{_libdir}/zypp/plugins/urlresolver mkdir -p $RPM_BUILD_ROOT%{_var}/lib/zypp mkdir -p $RPM_BUILD_ROOT%{_var}/log/zypp mkdir -p $RPM_BUILD_ROOT%{_var}/cache/zypp make -C po install DESTDIR=$RPM_BUILD_ROOT # Create filelist with translations cd .. %{find_lang} zypp popd mkdir -p __doc cp -p COPYING __doc cp -p package/libzypp.changes __doc/ChangeLog mv $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zypp-history.lr \ $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libzypp.lr %post /sbin/ldconfig if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi %postun -p /sbin/ldconfig %clean rm -rf "$RPM_BUILD_ROOT" %files -f zypp.lang %defattr(-,root,root) %dir %{_sysconfdir}/zypp %dir %{_sysconfdir}/zypp/repos.d %dir %{_sysconfdir}/zypp/services.d %config(noreplace) %{_sysconfdir}/zypp/zypp.conf %config(noreplace) %{_sysconfdir}/zypp/systemCheck %config(noreplace) %{_sysconfdir}/logrotate.d/libzypp.lr %dir %{_var}/lib/zypp %dir %{_var}/log/zypp %dir %{_var}/cache/zypp %dir %{_libexecdir}/zypp %{_libdir}/zypp %attr(0755,root,root) %{_libexecdir}/zypp/notify-message %{_datadir}/zypp %{_bindir}/* %{_libdir}/libzypp*so.* %doc %{_mandir}/man5/locks.5.* %doc __doc/* %files devel %defattr(-,root,root) %{_libdir}/libzypp.so %{_docdir}/%{name} %{_includedir}/zypp %{_datadir}/cmake/Modules/* %{_libdir}/pkgconfig/libzypp.pc %changelog * Tue Aug 09 2011 T.C. Hollingsworth - 9.10.1-2 - provide complete download URL - rewrite descriptions and summaries * Mon Aug 08 2011 T.C. Hollingsworth - 9.10.1-1 - inital package for Fedora # based on openSUSE spec file retrieved Mon Aug 08 2011 from # https://build.opensuse.org/package/view_file?file=libzypp.spec&package=libzypp&project=openSUSE%%3AFactory&srcmd5=4571cb7b93dab1e29f1b7e21574f7a47