3 %bcond_without apidocs # do not build and package API docs
4 %bcond_without python3 # CPython 3.x module
5 %bcond_with rhsm # Red Had Subscription Management support
7 Summary: Library providing simplified C and Python API to libsolv
8 Summary(pl.UTF-8): Biblioteka zapewniająca uproszczone API C i Pythona do libsolv
14 #Source0Download: https://github.com/rpm-software-management/libdnf/releases
15 Source0: https://github.com/rpm-software-management/libdnf/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: d62c97d5534394c365fe77978ce9cdd5
17 Patch0: %{name}-rpm5.patch
18 URL: https://github.com/rpm-software-management/libdnf
19 BuildRequires: check-devel
20 BuildRequires: cmake >= 2.4
21 BuildRequires: glib2-devel >= 1:2.46.0
22 BuildRequires: gobject-introspection-devel
23 BuildRequires: gtk-doc
24 BuildRequires: librepo-devel
25 %{?with_rhsm:BuildRequires: librhsm-devel}
26 BuildRequires: libsolv-devel >= 0.6.21
27 BuildRequires: pkgconfig
28 BuildRequires: rpm-devel >= 5
29 BuildRequires: rpm-pythonprov
30 BuildRequires: rpmbuild(macros) >= 1.714
31 BuildRequires: sphinx-pdg
32 BuildRequires: valgrind
33 Requires: glib2 >= 1:2.46.0
34 Requires: libsolv >= 0.6.21
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 # hawkey(3) man page shared between python-hawkey and python3-hawkey
38 %define _duplicate_files_terminate_build 0
41 Library providing simplified C and Python API to libsolv.
43 %description -l pl.UTF-8
44 Biblioteka zapewniająca uproszczone API C i Pythona do libsolv.
47 Summary: Header files for libdnf library
48 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libdnf
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
51 Requires: glib2-devel >= 1:2.46.0
52 Requires: librepo-devel
53 Requires: libsolv-devel >= 0.6.21
54 Requires: rpm-devel >= 5
57 Header files for libdnf library.
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki libdnf.
63 Summary: API documentation for libdnf library
64 Summary(pl.UTF-8): Dokumentacja API biblioteki libdnf
66 %if "%{_rpmversion}" >= "5"
71 API documentation for libdnf library.
73 %description apidocs -l pl.UTF-8
74 Dokumentacja API biblioteki libdnf.
76 %package -n python-hawkey
77 Summary: Python 2.x bindings for hawkey library
78 Summary(pl.UTF-8): Wiązania Pythona 2.x do biblioteki hawkey
79 Group: Libraries/Python
80 Requires: %{name} = %{version}-%{release}
82 %description -n python-hawkey
83 Python 2.x bindings for hawkey library.
85 %description -n python-hawkey -l pl.UTF-8
86 Wiązania Pythona 2.x do biblioteki hawkey.
88 %package -n python-hawkey-test
89 Summary: Test module for hawkey library
90 Summary(pl.UTF-8): Moduł testowy dla biblioteki hawkey
91 Group: Development/Libraries
92 Requires: python-hawkey = %{version}-%{release}
94 %description -n python-hawkey-test
95 Test module for hawkey library.
97 %description -n python-hawkey-test -l pl.UTF-8
98 Moduł testowy dla biblioteki hawkey.
100 %package -n python3-hawkey
101 Summary: Python 3.x bindings for hawkey library
102 Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki hawkey
103 Group: Libraries/Python
104 Requires: %{name} = %{version}-%{release}
106 %description -n python3-hawkey
107 Python 3.x bindings for hawkey library.
109 %description -n python3-hawkey -l pl.UTF-8
110 Wiązania Pythona 3.x do biblioteki hawkey.
112 %package -n python3-hawkey-test
113 Summary: Test module for hawkey library
114 Summary(pl.UTF-8): Moduł testowy dla biblioteki hawkey
115 Group: Development/Libraries
116 Requires: python3-hawkey = %{version}-%{release}
118 %description -n python3-hawkey-test
119 Test module for hawkey library.
121 %description -n python3-hawkey-test -l pl.UTF-8
122 Moduł testowy dla biblioteki hawkey.
129 install -d build %{?with_python3:build-py3}
132 %{?with_rhsm:-DENABLE_RHSM_SUPPORT=ON}
140 %{?with_rhsm:-DENABLE_RHSM_SUPPORT=ON} \
147 rm -rf $RPM_BUILD_ROOT
150 %{__make} -C build-py3 install \
151 DESTDIR=$RPM_BUILD_ROOT
153 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/hawkey
154 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/hawkey
157 %{__make} -C build install \
158 DESTDIR=$RPM_BUILD_ROOT
160 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
161 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
164 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
165 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
168 rm -rf $RPM_BUILD_ROOT
170 %post -p /sbin/ldconfig
171 %postun -p /sbin/ldconfig
174 %defattr(644,root,root,755)
175 %doc AUTHORS MAINTAINERS NEWS README.md docs/release_notes.rst
176 %attr(755,root,root) %{_libdir}/libdnf.so.1
177 %{_libdir}/girepository-1.0/Dnf-1.0.typelib
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_libdir}/libdnf.so
182 %{_includedir}/libdnf
183 %{_datadir}/gir-1.0/Dnf-1.0.gir
184 %{_pkgconfigdir}/libdnf.pc
188 %defattr(644,root,root,755)
192 %files -n python-hawkey
193 %defattr(644,root,root,755)
194 %dir %{py_sitedir}/hawkey
195 %attr(755,root,root) %{py_sitedir}/hawkey/_hawkeymodule.so
196 %{py_sitedir}/hawkey/__init__.py[co]
197 %{_mandir}/man3/hawkey.3*
199 %files -n python-hawkey-test
200 %defattr(644,root,root,755)
201 %dir %{py_sitedir}/hawkey/test
202 %{py_sitedir}/hawkey/test/*.py[co]
203 %attr(755,root,root) %{py_sitedir}/hawkey/test/_hawkey_testmodule.so
206 %files -n python3-hawkey
207 %defattr(644,root,root,755)
208 %dir %{py3_sitedir}/hawkey
209 %attr(755,root,root) %{py3_sitedir}/hawkey/_hawkey.so
210 %{py3_sitedir}/hawkey/*.py
211 %{py3_sitedir}/hawkey/__pycache__
212 %{_mandir}/man3/hawkey.3*
214 %files -n python3-hawkey-test
215 %defattr(644,root,root,755)
216 %dir %{py3_sitedir}/hawkey/test
217 %{py3_sitedir}/hawkey/test/*.py
218 %{py3_sitedir}/hawkey/test/__pycache__
219 %attr(755,root,root) %{py3_sitedir}/hawkey/test/_hawkey_test.so