[packages/hawkey] - new
qboosh
qboosh at pld-linux.org
Sun Nov 24 19:56:41 CET 2013
commit 9f59a81c0653bcf516f03b3e614858f8154650e1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Nov 24 19:57:30 2013 +0100
- new
hawkey-format.patch | 11 ++++
hawkey.spec | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 180 insertions(+)
---
diff --git a/hawkey.spec b/hawkey.spec
new file mode 100644
index 0000000..2c0276d
--- /dev/null
+++ b/hawkey.spec
@@ -0,0 +1,169 @@
+#
+# Conditional build:
+%bcond_without python3 # Python 3.x bindings
+#
+Summary: High-level API for the libsolv library
+Summary(pl.UTF-8): Wysokopoziomowe API dla biblioteki libsolv
+Name: hawkey
+%define snap 20131119
+Version: 0.4.5
+Release: 0.%{snap}.1
+License: LGPL v2.1+
+Group: Libraries
+Source0: %{name}.tar.xz
+# Source0-md5: a56265d2597c052dbe73895be1b7a994
+Patch0: %{name}-format.patch
+URL: https://github.com/akozumpl/hawkey
+BuildRequires: check-devel
+BuildRequires: cmake >= 2.4
+BuildRequires: expat-devel
+BuildRequires: libsolv-devel
+BuildRequires: python-devel >= 2
+%{?with_python3:BuildRequires: python3-devel >= 3}
+BuildRequires: rpm-devel
+BuildRequires: sphinx-pdg
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+BuildRequires: zlib-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Hawkey is a library providing simplified C and Python API to libsolv.
+
+%description -l pl.UTF-8
+Hawkey to biblioteka udostępniająca uproszczone API dla języków C i
+Python do biblioteki libsolv.
+
+%package devel
+Summary: Header files for hawkey library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki hawkey
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: libsolv-devel
+Requires: rpm-devel
+Requires: zlib-devel
+
+%description devel
+Header files for hawkey library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki hawkey.
+
+%package static
+Summary: Static hawkey library
+Summary(pl.UTF-8): Statyczna biblioteka hawkey
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static hawkey library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka hawkey.
+
+%package apidocs
+Summary: API documentation for hawkey library
+Summary(pl.UTF-8): Dokumentacja API biblioteki hawkey
+Group: Documentation
+
+%description apidocs
+API documentation for hawkey library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki hawkey.
+
+%package -n python-hawkey
+Summary: Python 2.x bindings for hawkey library
+Summary(pl.UTF-8): Wiązania Pythona 2.x do biblioteki hawkey
+Group: Libraries/Python
+Requires: %{name} = %{version}-%{release}
+
+%description -n python-hawkey
+Python 2.x bindings for hawkey library.
+
+%description -n python-hawkey -l pl.UTF-8
+Wiązania Pythona 2.x do biblioteki hawkey.
+
+%package -n python3-hawkey
+Summary: Python 3.x bindings for hawkey library
+Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki hawkey
+Group: Libraries/Python
+Requires: %{name} = %{version}-%{release}
+
+%description -n python3-hawkey
+Python 3.x bindings for hawkey library.
+
+%description -n python3-hawkey -l pl.UTF-8
+Wiązania Pythona 3.x do biblioteki hawkey.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+
+%build
+install -d build %{?with_python3:build-py3}
+cd build
+%cmake ..
+
+%{__make}
+%{__make} doc
+
+%if %{with python3}
+cd ../build-py3
+%cmake .. \
+ -DPYTHON_DESIRED=3
+
+%{__make}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python3}
+%{__make} -C build-py3/src/python install \
+ DESTDIR=$RPM_BUILD_ROOT
+%endif
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/hawkey/test
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS README.md
+%attr(755,root,root) %{_libdir}/libhawkey.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhawkey.so
+%{_includedir}/hawkey
+%{_pkgconfigdir}/hawkey.pc
+%{_mandir}/man3/hawkey.3*
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc build/doc/{*.html,*.js,_static}
+
+%files -n python-hawkey
+%defattr(644,root,root,755)
+%dir %{py_sitedir}/hawkey
+%attr(755,root,root) %{py_sitedir}/hawkey/_hawkeymodule.so
+%{py_sitedir}/hawkey/__init__.py[co]
+
+%if %{with python3}
+%files -n python3-hawkey
+%defattr(644,root,root,755)
+%dir %{py3_sitedir}/hawkey
+%attr(755,root,root) %{py3_sitedir}/hawkey/_hawkey.so
+%{py3_sitedir}/hawkey/__init__.py
+%endif
diff --git a/hawkey-format.patch b/hawkey-format.patch
new file mode 100644
index 0000000..d8270f4
--- /dev/null
+++ b/hawkey-format.patch
@@ -0,0 +1,11 @@
+--- hawkey/src/sack.c.orig 2013-11-24 17:59:02.000000000 +0100
++++ hawkey/src/sack.c 2013-11-24 18:40:47.035621464 +0100
+@@ -916,7 +916,7 @@
+ va_start(args, format);
+ vsnprintf(buf, sizeof(buf), format_nl, args);
+ va_end(args);
+- POOL_DEBUG(level, buf);
++ POOL_DEBUG(level, "%s", buf);
+ }
+
+ int
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hawkey.git/commitdiff/9f59a81c0653bcf516f03b3e614858f8154650e1
More information about the pld-cvs-commit
mailing list