3 %bcond_without apidocs # doxygen/sphinx API documentation
4 %bcond_without python3 # CPython 3.x module
6 Summary: Library for downloading Linux repository metadata and packages
7 Summary(pl.UTF-8): Biblioteka do pobierania metadanych repozytoriów roaz pakietów dla Linuksa
13 #Source0Download: https://github.com/rpm-software-management/librepo/releases
14 Source0: https://github.com/rpm-software-management/librepo/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 52dd2f4d9108a92f221bde3279bb75f1
16 Patch0: %{name}-link.patch
17 Patch2: sphinx_executable.patch
18 URL: http://rpm-software-management.github.io/librepo/
19 BuildRequires: check-devel
20 BuildRequires: cmake >= 2.8.5
21 BuildRequires: curl-devel
22 %{?with_apidocs:BuildRequires: doxygen}
23 BuildRequires: expat-devel >= 1.95
24 BuildRequires: glib2-devel >= 2.0
25 BuildRequires: gpgme-devel
26 BuildRequires: openssl-devel
27 BuildRequires: rpmbuild(macros) >= 1.605
29 BuildRequires: python3-devel >= 1:3
30 %{?with_apidocs:BuildRequires: sphinx-pdg-3}
32 BuildRequires: tar >= 1:1.22
33 BuildRequires: zchunk-devel >= 0.9.11
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 A library providing C and Python (libcURL like) API for downloading
39 Linux repository metadata and packages.
41 %description -l pl.UTF-8
42 Biblioteka udostępniająca API C i Pythona (podobne do libcURL) służące
43 do pobierania metadanych repozytoriów oraz pakietów dla Linuksa.
46 Summary: Header files for librepo library
47 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki librepo
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
51 Requires: expat-devel >= 1.95
52 Requires: glib2-devel >= 2.0
54 Requires: openssl-devel
57 Header files for librepo library.
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki librepo.
63 Summary: API documentation for librepo library
64 Summary(pl.UTF-8): Dokumentacja API biblioteki librepo
69 API documentation for librepo library.
71 %description apidocs -l pl.UTF-8
72 Dokumentacja API biblioteki librepo.
74 %package -n python3-librepo
75 Summary: Python 3 binding for librepo library
76 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki librepo
77 Group: Libraries/Python
78 Requires: %{name} = %{version}-%{release}
80 %description -n python3-librepo
81 Python 3 binding for librepo library.
83 %description -n python3-librepo -l pl.UTF-8
84 Wiązanie Pythona 3 do biblioteki librepo.
97 -DPYTHON_INSTALL_DIR="%{py3_sitedir}" \
98 -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-3
108 rm -rf $RPM_BUILD_ROOT
110 %{__make} -C build install \
111 DESTDIR=$RPM_BUILD_ROOT
114 rm -rf $RPM_BUILD_ROOT
116 %post -p /sbin/ldconfig
117 %postun -p /sbin/ldconfig
120 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/librepo.so.0
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{_libdir}/librepo.so
127 %{_includedir}/librepo
128 %{_pkgconfigdir}/librepo.pc
132 %defattr(644,root,root,755)
133 %doc build/doc/c/html/*
137 %files -n python3-librepo
138 %defattr(644,root,root,755)
140 %doc build/doc/python/{*.html,_sources,_static}
142 %dir %{py3_sitedir}/librepo
143 %attr(755,root,root) %{py3_sitedir}/librepo/_librepo.so
144 %{py3_sitedir}/librepo/__init__.py