3 %bcond_without apidocs # do not build and package API docs
5 Summary: Library for downloading Linux repository metadata and packages
6 Summary(pl.UTF-8): Biblioteka do pobierania metadanych repozytoriów roaz pakietów dla Linuksa
12 Source0: https://github.com/Tojaj/librepo/archive/%{name}-%{version}.tar.gz
13 # Source0-md5: e71590f07a38b10c0dfbf857d828b71c
14 #Source0: http://pkgs.fedoraproject.org/repo/pkgs/librepo/%{name}-%{gitrev}.tar.xz/904628ef27b512e7aed07a6d41613c87/librepo-%{gitrev}.tar.xz
15 Patch0: %{name}-link.patch
16 URL: http://tojaj.github.io/librepo/
17 BuildRequires: attr-devel
18 BuildRequires: check-devel
19 BuildRequires: cmake >= 2.6
20 BuildRequires: curl-devel
21 %{?with_apidocs:BuildRequires: doxygen}
22 BuildRequires: expat-devel >= 1.95
23 BuildRequires: glib2-devel >= 2.0
24 BuildRequires: gpgme-devel
25 BuildRequires: openssl-devel
26 BuildRequires: python-devel >= 2
27 BuildRequires: rpmbuild(macros) >= 1.605
28 %{?with_apidocs:BuildRequires: sphinx-pdg}
29 BuildRequires: tar >= 1:1.22
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 A library providing C and Python (libcURL like) API for downloading
35 Linux repository metadata and packages.
37 %description -l pl.UTF-8
38 Biblioteka udostępniająca API C i Pythona (podobne do libcURL) służące
39 do pobierania metadanych repozytoriów oraz pakietów dla Linuksa.
42 Summary: Header files for librepo library
43 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki librepo
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
47 Requires: expat-devel >= 1.95
48 Requires: glib2-devel >= 2.0
50 Requires: openssl-devel
53 Header files for librepo library.
55 %description devel -l pl.UTF-8
56 Pliki nagłówkowe biblioteki librepo.
59 Summary: API documentation for librepo library
60 Summary(pl.UTF-8): Dokumentacja API biblioteki librepo
64 API documentation for librepo library.
66 %description apidocs -l pl.UTF-8
67 Dokumentacja API biblioteki librepo.
69 %package -n python-librepo
70 Summary: Python binding for librepo library
71 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki librepo
72 Group: Libraries/Python
73 Requires: %{name} = %{version}-%{release}
75 %description -n python-librepo
76 Python binding for librepo library.
78 %description -n python-librepo -l pl.UTF-8
79 Wiązanie Pythona do biblioteki librepo.
82 %setup -q -n %{name}-%{name}-%{version}
97 rm -rf $RPM_BUILD_ROOT
99 %{__make} -C build install \
100 DESTDIR=$RPM_BUILD_ROOT
102 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/librepo
103 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/librepo
107 rm -rf $RPM_BUILD_ROOT
109 %post -p /sbin/ldconfig
110 %postun -p /sbin/ldconfig
113 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_libdir}/librepo.so.0
118 %defattr(644,root,root,755)
119 %attr(755,root,root) %{_libdir}/librepo.so
120 %{_includedir}/librepo
121 %{_pkgconfigdir}/librepo.pc
125 %defattr(644,root,root,755)
126 %doc build/doc/c/html/*
129 %files -n python-librepo
130 %defattr(644,root,root,755)
132 %doc build/doc/python/{*.html,_sources,_static}
134 %dir %{py_sitedir}/librepo
135 %attr(755,root,root) %{py_sitedir}/librepo/_librepomodule.so
136 %{py_sitedir}/librepo/__init__.py[co]