3 %bcond_without apidocs # do not build and package API docs
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 # argh, the latest tagged version is 1.0.0
14 #Source0: https://github.com/Tojaj/librepo/archive/%{version}/%{name}-%{version}.tar.gz
15 Source0: http://pkgs.fedoraproject.org/repo/pkgs/librepo/%{name}-%{gitrev}.tar.xz/904628ef27b512e7aed07a6d41613c87/librepo-%{gitrev}.tar.xz
16 # Source0-md5: 904628ef27b512e7aed07a6d41613c87
17 Patch0: %{name}-link.patch
18 URL: http://tojaj.github.io/librepo/
19 BuildRequires: attr-devel
20 BuildRequires: check-devel
21 BuildRequires: cmake >= 2.6
22 BuildRequires: curl-devel
23 %{?with_apidocs:BuildRequires: doxygen}
24 BuildRequires: expat-devel >= 1.95
25 BuildRequires: glib2-devel >= 2.0
26 BuildRequires: gpgme-devel
27 BuildRequires: openssl-devel
28 BuildRequires: python-devel >= 2
29 BuildRequires: rpmbuild(macros) >= 1.605
30 %{?with_apidocs:BuildRequires: sphinx-pdg}
31 BuildRequires: tar >= 1:1.22
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 A library providing C and Python (libcURL like) API for downloading
37 Linux repository metadata and packages.
39 %description -l pl.UTF-8
40 Biblioteka udostępniająca API C i Pythona (podobne do libcURL) służące
41 do pobierania metadanych repozytoriów oraz pakietów dla Linuksa.
44 Summary: Header files for librepo library
45 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki librepo
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
49 Requires: expat-devel >= 1.95
50 Requires: glib2-devel >= 2.0
52 Requires: openssl-devel
55 Header files for librepo library.
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe biblioteki librepo.
61 Summary: API documentation for librepo library
62 Summary(pl.UTF-8): Dokumentacja API biblioteki librepo
66 API documentation for librepo library.
68 %description apidocs -l pl.UTF-8
69 Dokumentacja API biblioteki librepo.
71 %package -n python-librepo
72 Summary: Python binding for librepo library
73 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki librepo
74 Group: Libraries/Python
75 Requires: %{name} = %{version}-%{release}
77 %description -n python-librepo
78 Python binding for librepo library.
80 %description -n python-librepo -l pl.UTF-8
81 Wiązanie Pythona do biblioteki librepo.
99 rm -rf $RPM_BUILD_ROOT
101 %{__make} -C build install \
102 DESTDIR=$RPM_BUILD_ROOT
104 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/librepo
105 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/librepo
109 rm -rf $RPM_BUILD_ROOT
111 %post -p /sbin/ldconfig
112 %postun -p /sbin/ldconfig
115 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_libdir}/librepo.so.0
120 %defattr(644,root,root,755)
121 %attr(755,root,root) %{_libdir}/librepo.so
122 %{_includedir}/librepo
123 %{_pkgconfigdir}/librepo.pc
127 %defattr(644,root,root,755)
128 %doc build/doc/c/html/*
131 %files -n python-librepo
132 %defattr(644,root,root,755)
134 %doc build/doc/python/{*.html,_sources,_static}
136 %dir %{py_sitedir}/librepo
137 %attr(755,root,root) %{py_sitedir}/librepo/_librepomodule.so
138 %{py_sitedir}/librepo/__init__.py[co]