3 %bcond_without apidocs # doxygen/sphinx API documentation
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Library for downloading Linux repository metadata and packages
8 Summary(pl.UTF-8): Biblioteka do pobierania metadanych repozytoriów roaz pakietów dla Linuksa
14 #Source0Download: https://github.com/rpm-software-management/librepo/releases
15 Source0: https://github.com/rpm-software-management/librepo/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: 01fe130eb421580d62e97e4991e94df7
17 Patch0: %{name}-link.patch
18 Patch1: %{name}-attr.patch
19 Patch2: sphinx_executable.patch
20 URL: http://rpm-software-management.github.io/librepo/
21 BuildRequires: check-devel
22 BuildRequires: cmake >= 2.8.5
23 BuildRequires: curl-devel
24 %{?with_apidocs:BuildRequires: doxygen}
25 BuildRequires: expat-devel >= 1.95
26 BuildRequires: glib2-devel >= 2.0
27 BuildRequires: gpgme-devel
28 BuildRequires: openssl-devel
29 BuildRequires: rpmbuild(macros) >= 1.605
31 BuildRequires: python-devel >= 1:2
32 %{?with_apidocs:BuildRequires: sphinx-pdg-2}
35 BuildRequires: python3-devel >= 1:3
36 %{?with_apidocs:BuildRequires: sphinx-pdg-3}
38 BuildRequires: tar >= 1:1.22
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 A library providing C and Python (libcURL like) API for downloading
44 Linux repository metadata and packages.
46 %description -l pl.UTF-8
47 Biblioteka udostępniająca API C i Pythona (podobne do libcURL) służące
48 do pobierania metadanych repozytoriów oraz pakietów dla Linuksa.
51 Summary: Header files for librepo library
52 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki librepo
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
56 Requires: expat-devel >= 1.95
57 Requires: glib2-devel >= 2.0
59 Requires: openssl-devel
62 Header files for librepo library.
64 %description devel -l pl.UTF-8
65 Pliki nagłówkowe biblioteki librepo.
68 Summary: API documentation for librepo library
69 Summary(pl.UTF-8): Dokumentacja API biblioteki librepo
74 API documentation for librepo library.
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API biblioteki librepo.
79 %package -n python-librepo
80 Summary: Python 2 binding for librepo library
81 Summary(pl.UTF-8): Wiązanie Pythona 2 do biblioteki librepo
82 Group: Libraries/Python
83 Requires: %{name} = %{version}-%{release}
85 %description -n python-librepo
86 Python 2 binding for librepo library.
88 %description -n python-librepo -l pl.UTF-8
89 Wiązanie Pythona 2 do biblioteki librepo.
91 %package -n python3-librepo
92 Summary: Python 3 binding for librepo library
93 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki librepo
94 Group: Libraries/Python
95 Requires: %{name} = %{version}-%{release}
97 %description -n python3-librepo
98 Python 3 binding for librepo library.
100 %description -n python3-librepo -l pl.UTF-8
101 Wiązanie Pythona 3 do biblioteki librepo.
115 -DPYTHON_INSTALL_DIR="%{py_sitedir}" \
116 -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-2
131 -DPYTHON_INSTALL_DIR="%{py3_sitedir}" \
132 -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-3
143 rm -rf $RPM_BUILD_ROOT
145 %{__make} -C build install \
146 DESTDIR=$RPM_BUILD_ROOT
149 %{__make} -C build-py3 install \
150 DESTDIR=$RPM_BUILD_ROOT
153 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/librepo
154 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/librepo
158 rm -rf $RPM_BUILD_ROOT
160 %post -p /sbin/ldconfig
161 %postun -p /sbin/ldconfig
164 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_libdir}/librepo.so.0
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/librepo.so
171 %{_includedir}/librepo
172 %{_pkgconfigdir}/librepo.pc
176 %defattr(644,root,root,755)
177 %doc build/doc/c/html/*
181 %files -n python-librepo
182 %defattr(644,root,root,755)
184 %doc build/doc/python/{*.html,_sources,_static}
186 %dir %{py_sitedir}/librepo
187 %attr(755,root,root) %{py_sitedir}/librepo/_librepomodule.so
188 %{py_sitedir}/librepo/__init__.py[co]
192 %files -n python3-librepo
193 %defattr(644,root,root,755)
195 %doc build-py3/doc/python/{*.html,_sources,_static}
197 %dir %{py3_sitedir}/librepo
198 %attr(755,root,root) %{py3_sitedir}/librepo/_librepo.so
199 %{py3_sitedir}/librepo/__init__.py