]>
Commit | Line | Data |
---|---|---|
b3591a76 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
f8d47da0 | 4 | |
b3591a76 JB |
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 | |
7 | Name: librepo | |
2e048581 | 8 | Version: 1.7.13 |
b64e9f40 | 9 | Release: 4 |
b3591a76 JB |
10 | License: GPL v2+ |
11 | Group: Libraries | |
73a14cac | 12 | Source0: https://github.com/Tojaj/librepo/archive/%{name}-%{version}.tar.gz |
2e048581 | 13 | # Source0-md5: e71590f07a38b10c0dfbf857d828b71c |
73a14cac | 14 | #Source0: http://pkgs.fedoraproject.org/repo/pkgs/librepo/%{name}-%{gitrev}.tar.xz/904628ef27b512e7aed07a6d41613c87/librepo-%{gitrev}.tar.xz |
b3591a76 JB |
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} | |
f8d47da0 | 22 | BuildRequires: expat-devel >= 1.95 |
b3591a76 JB |
23 | BuildRequires: glib2-devel >= 2.0 |
24 | BuildRequires: gpgme-devel | |
b3591a76 JB |
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 | |
30 | BuildRequires: xz | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | A library providing C and Python (libcURL like) API for downloading | |
35 | Linux repository metadata and packages. | |
36 | ||
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. | |
40 | ||
41 | %package devel | |
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} | |
46 | Requires: curl-devel | |
47 | Requires: expat-devel >= 1.95 | |
48 | Requires: glib2-devel >= 2.0 | |
49 | Requires: gpgme-devel | |
50 | Requires: openssl-devel | |
51 | ||
52 | %description devel | |
53 | Header files for librepo library. | |
54 | ||
55 | %description devel -l pl.UTF-8 | |
56 | Pliki nagłówkowe biblioteki librepo. | |
57 | ||
58 | %package apidocs | |
59 | Summary: API documentation for librepo library | |
60 | Summary(pl.UTF-8): Dokumentacja API biblioteki librepo | |
61 | Group: Documentation | |
62 | ||
63 | %description apidocs | |
64 | API documentation for librepo library. | |
65 | ||
66 | %description apidocs -l pl.UTF-8 | |
67 | Dokumentacja API biblioteki librepo. | |
68 | ||
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} | |
74 | ||
75 | %description -n python-librepo | |
76 | Python binding for librepo library. | |
77 | ||
78 | %description -n python-librepo -l pl.UTF-8 | |
79 | Wiązanie Pythona do biblioteki librepo. | |
80 | ||
81 | %prep | |
73a14cac | 82 | %setup -q -n %{name}-%{name}-%{version} |
b3591a76 JB |
83 | %patch0 -p1 |
84 | ||
85 | %build | |
86 | install -d build | |
87 | cd build | |
88 | %cmake .. | |
89 | ||
90 | %{__make} | |
91 | ||
92 | %if %{with apidocs} | |
93 | %{__make} doc | |
94 | %endif | |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %{__make} -C build install \ | |
100 | DESTDIR=$RPM_BUILD_ROOT | |
101 | ||
102 | %py_comp $RPM_BUILD_ROOT%{py_sitedir}/librepo | |
103 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/librepo | |
104 | %py_postclean | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %post -p /sbin/ldconfig | |
110 | %postun -p /sbin/ldconfig | |
111 | ||
112 | %files | |
113 | %defattr(644,root,root,755) | |
114 | %doc README.md | |
115 | %attr(755,root,root) %{_libdir}/librepo.so.0 | |
116 | ||
117 | %files devel | |
118 | %defattr(644,root,root,755) | |
119 | %attr(755,root,root) %{_libdir}/librepo.so | |
120 | %{_includedir}/librepo | |
121 | %{_pkgconfigdir}/librepo.pc | |
122 | ||
123 | %if %{with apidocs} | |
124 | %files apidocs | |
125 | %defattr(644,root,root,755) | |
126 | %doc build/doc/c/html/* | |
127 | %endif | |
128 | ||
129 | %files -n python-librepo | |
130 | %defattr(644,root,root,755) | |
131 | %if %{with apidocs} | |
132 | %doc build/doc/python/{*.html,_sources,_static} | |
133 | %endif | |
134 | %dir %{py_sitedir}/librepo | |
135 | %attr(755,root,root) %{py_sitedir}/librepo/_librepomodule.so | |
136 | %{py_sitedir}/librepo/__init__.py[co] |