[packages/libzypp] - initial
qboosh
qboosh at pld-linux.org
Fri Feb 20 22:45:23 CET 2015
commit e09b6e5307df38079bf917e87e228859124e8f75
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Feb 20 22:48:11 2015 +0100
- initial
libzypp-includes.patch | 10 ++++
libzypp-link.patch | 19 +++++++
libzypp-rpm5.patch | 42 ++++++++++++++++
libzypp.spec | 134 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 205 insertions(+)
---
diff --git a/libzypp.spec b/libzypp.spec
new file mode 100644
index 0000000..c078d4c
--- /dev/null
+++ b/libzypp.spec
@@ -0,0 +1,134 @@
+#
+# Conditional build:
+%bcond_without apidocs # do not build and package API docs
+#
+Summary: Package management library
+Summary(pl.UTF-8): Biblioteka do zarządzania pakietami
+Name: libzypp
+Version: 14.36.0
+Release: 1
+License: GPL v2+
+Group: Libraries
+Source0: https://github.com/openSUSE/libzypp/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: ebf8051e811361188008fa5396233023
+Patch0: %{name}-rpm5.patch
+Patch1: %{name}-includes.patch
+Patch2: %{name}-link.patch
+URL: https://en.opensuse.org/Portal:Libzypp
+BuildRequires: boost-devel
+BuildRequires: cmake >= 2.6
+BuildRequires: curl-devel
+%{?with_apidocs:BuildRequires: doxygen}
+BuildRequires: expat-devel >= 1.95
+BuildRequires: gettext-tools
+BuildRequires: libproxy-devel
+# with helixrepo enabled
+BuildRequires: libsolv-devel >= 0.6.8
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libxml2-devel >= 2.0
+BuildRequires: openssl-devel
+BuildRequires: rpm-devel >= 5
+BuildRequires: udev-devel
+BuildRequires: zlib-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libzypp is the package management library that powers applications
+like YaST, zypper and the openSUSE/SLE implementation of PackageKit.
+
+%description -l pl.UTF-8
+libzypp to biblioteka do zarządzania pakietami wspomagająca aplikacje
+takie jak YaST, zypper czy implementacja PackageKit wykorzystywana w
+dystrybucjach openSUSE/SLE.
+
+%package devel
+Summary: Header files for Zypp library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Zypp
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: boost-devel
+Requires: curl-devel
+Requires: libsolv-devel >= 0.6.8
+Requires: libstdc++-devel
+Requires: libxml2-devel >= 2.0
+Requires: rpm-devel >= 5
+
+%description devel
+Header files for Zypp library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Zypp.
+
+%package apidocs
+Summary: Zypp API documentation
+Summary(pl.UTF-8): Dokumentacja API biblioteki Zypp
+Group: Documentation
+
+%description apidocs
+API documentation for Zypp library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki Zypp.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+install -d build
+cd build
+%cmake .. \
+ %{?with_apidocs:-DENABLE_BUILD_DOCS=ON} \
+ -DENABLE_BUILD_TRANS=ON
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/packages/libzypp/libzypp/html $RPM_BUILD_ROOT%{_docdir}/libzypp-apidocs
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/packages/libzypp/libzypp/libzypp.doxytag
+
+%find_lang zypp
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files -f zypp.lang
+%defattr(644,root,root,755)
+%doc COPYING
+%dir %{_sysconfdir}/zypp
+%config(noreplace) %verify(not mtime md5 size) %{_sysconfdir}/zypp/systemCheck
+%config(noreplace) %verify(not mtime md5 size) %{_sysconfdir}/zypp/zypp.conf
+%config(noreplace) %verify(not mtime md5 size) /etc/logrotate.d/zypp-history.lr
+%attr(755,root,root) %{_bindir}/zypp-CheckAccessDeleted
+%attr(755,root,root) %{_bindir}/zypp-NameReqPrv
+%attr(755,root,root) %{_libdir}/libzypp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libzypp.so.1430
+%dir %{_libdir}/zypp
+%attr(755,root,root) %{_libdir}/zypp/notify-message
+%{_datadir}/zypp
+%{_mandir}/man1/zypp-CheckAccessDeleted.1*
+%{_mandir}/man1/zypp-NameReqPrv.1*
+%{_mandir}/man5/locks.5*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libzypp.so
+%{_includedir}/zypp
+%{_pkgconfigdir}/libzypp.pc
+%{_datadir}/cmake/Modules/FindZypp.cmake
+%{_datadir}/cmake/Modules/ZyppCommon.cmake
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%{_docdir}/libzypp-apidocs
+%endif
diff --git a/libzypp-includes.patch b/libzypp-includes.patch
new file mode 100644
index 0000000..d773d3b
--- /dev/null
+++ b/libzypp-includes.patch
@@ -0,0 +1,10 @@
+--- libzypp-14.36.0/zypp/target/RpmPostTransCollector.cc.orig 2015-02-09 16:07:05.000000000 +0100
++++ libzypp-14.36.0/zypp/target/RpmPostTransCollector.cc 2015-02-18 21:01:59.000864806 +0100
+@@ -19,6 +19,7 @@
+ #include "zypp/HistoryLog.h"
+ #include "zypp/ZYppCallbacks.h"
+ #include "zypp/ExternalProgram.h"
++#include "zypp/ZConfig.h"
+ #include "zypp/target/rpm/RpmHeader.h"
+
+
diff --git a/libzypp-link.patch b/libzypp-link.patch
new file mode 100644
index 0000000..f4f43d3
--- /dev/null
+++ b/libzypp-link.patch
@@ -0,0 +1,19 @@
+--- libzypp-14.36.0/zypp/CMakeLists.txt.orig 2015-02-09 16:07:05.000000000 +0100
++++ libzypp-14.36.0/zypp/CMakeLists.txt 2015-02-19 20:52:36.890595858 +0100
+@@ -921,7 +921,7 @@
+ # System libraries
+ SET(UTIL_LIBRARY util)
+ TARGET_LINK_LIBRARIES(zypp ${UTIL_LIBRARY} )
+-TARGET_LINK_LIBRARIES(zypp ${RPM_LIBRARY} )
++TARGET_LINK_LIBRARIES(zypp ${RPM_LIBRARY} rpmdb rpmio )
+ TARGET_LINK_LIBRARIES(zypp ${GETTEXT_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(zypp ${CURL_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(zypp ${LIBXML2_LIBRARIES} )
+@@ -940,6 +940,7 @@
+ ENDIF ( UDEV_FOUND )
+
+ TARGET_LINK_LIBRARIES(zypp ${LIBPROXY_LIBRARIES} )
++TARGET_LINK_LIBRARIES(zypp pthread )
+
+ INSTALL(TARGETS zypp LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
+
diff --git a/libzypp-rpm5.patch b/libzypp-rpm5.patch
new file mode 100644
index 0000000..45919b7
--- /dev/null
+++ b/libzypp-rpm5.patch
@@ -0,0 +1,42 @@
+--- libzypp-14.36.0/zypp/target/rpm/BinHeader.h.orig 2015-02-09 16:07:05.000000000 +0100
++++ libzypp-14.36.0/zypp/target/rpm/BinHeader.h 2015-02-17 20:28:45.204574339 +0100
+@@ -110,7 +110,7 @@
+ {
+ public:
+ intList()
+- : _type( RPM_NULL_TYPE )
++ : _type( static_cast<rpmTagType>(RPM_NULL_TYPE) )
+ {}
+
+ bool empty() const
+--- libzypp-14.36.0/zypp/target/rpm/librpm.h.orig 2015-02-09 16:07:05.000000000 +0100
++++ libzypp-14.36.0/zypp/target/rpm/librpm.h 2015-02-18 18:24:23.831261616 +0100
+@@ -15,6 +15,8 @@
+ #ifdef _RPM_5
+ // needs to be outside 'extern "C"'
+ #include <rpm/rpm4compat.h>
++#define _RPMVSF_NOSIGNATURES (RPMVSF_NODSAHEADER | RPMVSF_NORSAHEADER | RPMVSF_NODSA | RPMVSF_NORSA)
++#define _RPMVSF_NODIGESTS (RPMVSF_NOSHA1HEADER | RPMVSF_NOMD5HEADER | RPMVSF_NOSHA1 | RPMVSF_NOMD5)
+ #endif // _RPM_5
+
+ extern "C"
+--- libzypp-14.36.0/zypp/target/rpm/librpmDb.cc.orig 2015-02-09 16:07:05.000000000 +0100
++++ libzypp-14.36.0/zypp/target/rpm/librpmDb.cc 2015-02-18 19:50:12.301045536 +0100
+@@ -101,7 +101,7 @@
+ {
+ if ( _ts )
+ {
+- ::rpmtsFree(_ts);
++ rpmtsFree(_ts);
+ }
+ }
+ };
+@@ -679,7 +679,7 @@
+ if ( ! create( RPMDBI_PACKAGES ) )
+ return false;
+ #warning TESTCASE: rpmdbAppendIterator and (non)sequential access?
+-#ifdef RPMFILEITERMAX // since rpm.4.12
++#if defined(_RPM_5) || defined(RPMFILEITERMAX) // since rpm.4.12
+ ::rpmdbAppendIterator( _mi, (const unsigned *)&off_r, 1 );
+ #else
+ ::rpmdbAppendIterator( _mi, &off_r, 1 );
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libzypp.git/commitdiff/e09b6e5307df38079bf917e87e228859124e8f75
More information about the pld-cvs-commit
mailing list