3 %bcond_without python3 # Python 3.x bindings
5 %define gitrev b5cd13dc11dac38d4b7667dfe91b974424157935
6 Summary: High-level API for the libsolv library
7 Summary(pl.UTF-8): Wysokopoziomowe API dla biblioteki libsolv
13 Source0: https://github.com/rpm-software-management/hawkey/archive/%{gitrev}/%{name}-%{gitrev}.tar.gz
14 # Source0-md5: 83147172a890bcc682cd7e0d9a5d34ed
15 URL: https://github.com/rpm-software-management/hawkey
16 BuildRequires: check-devel
17 BuildRequires: cmake >= 2.4
18 BuildRequires: expat-devel
19 BuildRequires: libsolv-devel >= 0.6.5
20 BuildRequires: python-devel >= 2
21 %{?with_python3:BuildRequires: python3-devel >= 3}
22 BuildRequires: rpm-devel
23 BuildRequires: sphinx-pdg
24 BuildRequires: tar >= 1:1.22
26 BuildRequires: zlib-devel
27 Requires: libsolv >= 0.6.5
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Hawkey is a library providing simplified C and Python API to libsolv.
33 %description -l pl.UTF-8
34 Hawkey to biblioteka udostępniająca uproszczone API dla języków C i
35 Python do biblioteki libsolv.
38 Summary: Header files for hawkey library
39 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki hawkey
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
42 Requires: libsolv-devel >= 0.6.5
45 Obsoletes: hawkey-static
48 Header files for hawkey library.
50 %description devel -l pl.UTF-8
51 Pliki nagłówkowe biblioteki hawkey.
54 Summary: API documentation for hawkey library
55 Summary(pl.UTF-8): Dokumentacja API biblioteki hawkey
59 API documentation for hawkey library.
61 %description apidocs -l pl.UTF-8
62 Dokumentacja API biblioteki hawkey.
64 %package -n python-hawkey
65 Summary: Python 2.x bindings for hawkey library
66 Summary(pl.UTF-8): Wiązania Pythona 2.x do biblioteki hawkey
67 Group: Libraries/Python
68 Requires: %{name} = %{version}-%{release}
70 %description -n python-hawkey
71 Python 2.x bindings for hawkey library.
73 %description -n python-hawkey -l pl.UTF-8
74 Wiązania Pythona 2.x do biblioteki hawkey.
76 %package -n python-hawkey-test
77 Summary: Test module for hawkey library
78 Summary(pl.UTF-8): Moduł testowy dla biblioteki hawkey
79 Group: Development/Libraries
80 Requires: python-hawkey = %{version}-%{release}
82 %description -n python-hawkey-test
83 Test module for hawkey library.
85 %description -n python-hawkey-test -l pl.UTF-8
86 Moduł testowy dla biblioteki hawkey.
88 %package -n python3-hawkey
89 Summary: Python 3.x bindings for hawkey library
90 Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki hawkey
91 Group: Libraries/Python
92 Requires: %{name} = %{version}-%{release}
94 %description -n python3-hawkey
95 Python 3.x bindings for hawkey library.
97 %description -n python3-hawkey -l pl.UTF-8
98 Wiązania Pythona 3.x do biblioteki hawkey.
101 %setup -q -n %{name}-%{gitrev}
104 install -d build %{?with_python3:build-py3}
120 rm -rf $RPM_BUILD_ROOT
123 %{__make} -C build-py3/src/python install \
124 DESTDIR=$RPM_BUILD_ROOT
127 %{__make} -C build install \
128 DESTDIR=$RPM_BUILD_ROOT
130 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
131 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
135 rm -rf $RPM_BUILD_ROOT
137 %post -p /sbin/ldconfig
138 %postun -p /sbin/ldconfig
141 %defattr(644,root,root,755)
142 %doc AUTHORS README.rst
143 %attr(755,root,root) %{_libdir}/libhawkey.so.2
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_libdir}/libhawkey.so
148 %{_includedir}/hawkey
149 %{_pkgconfigdir}/hawkey.pc
150 %{_mandir}/man3/hawkey.3*
153 %defattr(644,root,root,755)
154 %doc build/doc/{*.html,*.js,_static}
156 %files -n python-hawkey
157 %defattr(644,root,root,755)
158 %dir %{py_sitedir}/hawkey
159 %attr(755,root,root) %{py_sitedir}/hawkey/_hawkeymodule.so
160 %{py_sitedir}/hawkey/*.py[co]
162 %files -n python-hawkey-test
163 %defattr(644,root,root,755)
164 %dir %{py_sitedir}/hawkey/test
165 %{py_sitedir}/hawkey/test/*.py[co]
166 %attr(755,root,root) %{py_sitedir}/hawkey/test/_hawkey_testmodule.so
169 %files -n python3-hawkey
170 %defattr(644,root,root,755)
171 %dir %{py3_sitedir}/hawkey
172 %attr(755,root,root) %{py3_sitedir}/hawkey/_hawkey.so
173 %{py3_sitedir}/hawkey/*.py