]>
Commit | Line | Data |
---|---|---|
eb85e3be JB |
1 | # TODO: tests fail (rpm.org vs rpm5 compat problems?) |
2 | # | |
3 | # Conditional build: | |
807f0e8d | 4 | %bcond_without python3 # CPython 3.x module |
16c66ee9 | 5 | %bcond_with tests # make tests |
7ab42891 | 6 | |
eb85e3be JB |
7 | Summary: Creates a common metadata repository |
8 | Summary(pl.UTF-8): Tworzenie wspólnego repozytorium metadanych | |
9 | Name: createrepo_c | |
807f0e8d | 10 | Version: 0.10.0 |
7ab42891 | 11 | Release: 1 |
eb85e3be JB |
12 | License: GPL v2+ |
13 | Group: Applications/System | |
807f0e8d JB |
14 | #Source0Download: https://github.com/rpm-software-management/createrepo_c/releases |
15 | Source0: https://github.com/rpm-software-management/createrepo_c/archive/%{version}/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: 2e14b3e5d289875b894000ab1e54f1ec | |
eb85e3be | 17 | Patch0: %{name}-rpm5.patch |
16c66ee9 | 18 | Patch1: %{name}-python.patch |
807f0e8d | 19 | Patch2: %{name}-include.patch |
bd7532a4 | 20 | Patch3: %{name}-bashcompdir.patch |
807f0e8d | 21 | URL: https://github.com/rpm-software-management/createrepo_c |
eb85e3be JB |
22 | BuildRequires: bzip2-devel |
23 | BuildRequires: check-devel | |
24 | BuildRequires: cmake >= 2.6 | |
25 | BuildRequires: curl-devel | |
26 | BuildRequires: doxygen | |
27 | BuildRequires: expat-devel | |
28 | BuildRequires: glib2-devel >= 1:2.22.0 | |
29 | BuildRequires: libmagic-devel | |
30 | BuildRequires: libxml2-devel >= 2 | |
31 | BuildRequires: openssl-devel | |
32 | BuildRequires: python-devel >= 2 | |
33 | %{?with_tests:BuildRequires: python-nose} | |
807f0e8d JB |
34 | %if %{with python3} |
35 | BuildRequires: python3-devel >= 1:3.2 | |
36 | %{?with_tests:BuildRequires: python3-nose} | |
37 | %endif | |
eb85e3be JB |
38 | BuildRequires: rpm-devel >= 5 |
39 | BuildRequires: rpm-pythonprov | |
40 | BuildRequires: rpmbuild(macros) >= 1.219 | |
16c66ee9 | 41 | BuildRequires: sphinx-pdg-2 |
eb85e3be | 42 | BuildRequires: sqlite3-devel >= 3 |
eb85e3be JB |
43 | BuildRequires: xz-devel |
44 | BuildRequires: zlib-devel | |
45 | Requires: %{name}-libs = %{version}-%{release} | |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | %description | |
49 | C implementation of Createrepo. This utility will generate a common | |
50 | metadata repository from a directory of RPM packages. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | Implementacja w C programu Createrepo. To narzędzie generuje wspólne | |
54 | repozytorium metadanych z katalogu pakietów RPM. | |
55 | ||
56 | %package libs | |
57 | Summary: Library for repodata manipulation | |
58 | Summary(pl.UTF-8): Biblioteka do operacji na danych repozytorium | |
59 | Group: Libraries | |
60 | Requires: glib2 >= 1:2.22.0 | |
61 | ||
62 | %description libs | |
63 | This package contains the createrepo_c library for applications to | |
64 | easy manipulate with a repodata. | |
65 | ||
66 | %description libs -l pl.UTF-8 | |
67 | Ten pakiet zawiera bibliotekę createrepo_c, pozwalającą aplikacjom na | |
68 | łatwe operowanie na danych repozytorium (repodata). | |
69 | ||
70 | %package devel | |
71 | Summary: Header files for createrepo_c library | |
72 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki createrepo_c | |
73 | Group: Development/Libraries | |
74 | Requires: %{name}-libs = %{version}-%{release} | |
75 | Requires: bzip2-devel | |
76 | Requires: curl-devel | |
77 | Requires: expat-devel | |
78 | Requires: glib2-devel >= 1:2.22.0 | |
79 | Requires: libmagic-devel | |
80 | Requires: libxml2-devel >= 2 | |
81 | Requires: rpm-devel >= 5 | |
82 | Requires: sqlite3-devel >= 3 | |
83 | Requires: xz-devel | |
84 | Requires: zlib-devel | |
85 | ||
86 | %description devel | |
87 | This package contains the createrepo_c C header files. These | |
88 | development files are for easy manipulation with a repodata. | |
89 | ||
90 | %description devel -l pl.UTF-8 | |
7ab42891 ER |
91 | Ten pakiet zawiera pliki nagłówkowe C biblioteki createrepo_c. Mają na |
92 | celu łatwe operowanie na danych repozytorium (repodata). | |
eb85e3be JB |
93 | |
94 | %package apidocs | |
95 | Summary: API documentation for createrepo_c library | |
96 | Summary(pl.UTF-8): Dokumentacja API biblioteki createrepo_c | |
97 | Group: Documentation | |
98 | ||
99 | %description apidocs | |
100 | API documentation for createrepo_c library. | |
101 | ||
102 | %description apidocs -l pl.UTF-8 | |
103 | Dokumentacja API biblioteki createrepo_c. | |
104 | ||
105 | %package -n python-createrepo_c | |
807f0e8d JB |
106 | Summary: Python 2 bindings for the createrepo_c library |
107 | Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki createrepo_c | |
eb85e3be JB |
108 | Group: Development/Languages/Python |
109 | Requires: %{name}-libs = %{version}-%{release} | |
110 | ||
111 | %description -n python-createrepo_c | |
807f0e8d | 112 | Python 2 bindings for the createrepo_c library. |
eb85e3be JB |
113 | |
114 | %description -n python-createrepo_c -l pl.UTF-8 | |
807f0e8d JB |
115 | Wiązania Pythona 2 do biblioteki createrepo_c. |
116 | ||
117 | %package -n python3-createrepo_c | |
118 | Summary: Python 3 bindings for the createrepo_c library | |
119 | Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki createrepo_c | |
120 | Group: Development/Languages/Python | |
121 | Requires: %{name}-libs = %{version}-%{release} | |
122 | ||
123 | %description -n python3-createrepo_c | |
124 | Python 3 bindings for the createrepo_c library. | |
125 | ||
126 | %description -n python3-createrepo_c -l pl.UTF-8 | |
127 | Wiązania Pythona 3 do biblioteki createrepo_c. | |
eb85e3be JB |
128 | |
129 | %package -n bash-completion-createrepo_c | |
130 | Summary: Bash completion for createrepo_c commands | |
131 | Summary(pl.UTF-8): Bashowe uzupełnianie dla poleceń createrepo_c | |
132 | Group: Applications/Shells | |
133 | Requires: %{name} = %{version}-%{release} | |
bd7532a4 | 134 | Requires: bash-completion >= 2.0 |
eb85e3be JB |
135 | |
136 | %description -n bash-completion-createrepo_c | |
137 | Bash completion for createrepo_c commands (createrepo_c, mergerepo_c, | |
138 | modifyrepo_c). | |
139 | ||
140 | %description -n bash-completion-createrepo_c -l pl.UTF-8 | |
141 | Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c, | |
142 | mergerepo_c, modifyrepo_c). | |
143 | ||
144 | %prep | |
807f0e8d | 145 | %setup -q |
eb85e3be | 146 | %patch0 -p1 |
16c66ee9 | 147 | %patch1 -p1 |
807f0e8d | 148 | %patch2 -p1 |
eb85e3be JB |
149 | |
150 | %build | |
807f0e8d JB |
151 | install -d build %{?with_python3:build-py3} |
152 | ||
153 | cd build | |
bd7532a4 JB |
154 | %cmake .. \ |
155 | -DBASHCOMP_DIR=%{bashcomp_dir} | |
16c66ee9 | 156 | |
eb85e3be JB |
157 | %{__make} |
158 | %{__make} doc | |
159 | ||
160 | %if %{with tests} | |
161 | %{__make} tests | |
162 | %{__make} test \ | |
163 | ARGS="-V" | |
164 | %endif | |
807f0e8d JB |
165 | cd .. |
166 | ||
167 | %if %{with python3} | |
168 | cd build-py3 | |
169 | %cmake .. \ | |
bd7532a4 | 170 | -DBASHCOMP_DIR=%{bashcomp_dir} \ |
807f0e8d JB |
171 | -DPYTHON_DESIRED=3 |
172 | ||
173 | %{__make} | |
174 | ||
175 | %if %{with tests} | |
176 | %{__make} tests | |
177 | %{__make} test \ | |
178 | ARGS="-V" | |
179 | %endif | |
180 | cd .. | |
181 | %endif | |
eb85e3be JB |
182 | |
183 | %install | |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | ||
807f0e8d JB |
186 | %if %{with python3} |
187 | %{__make} -C build-py3 install \ | |
188 | DESTDIR=$RPM_BUILD_ROOT | |
189 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c | |
190 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/createrepo_c | |
191 | %endif | |
192 | ||
193 | %{__make} -C build install \ | |
eb85e3be JB |
194 | DESTDIR=$RPM_BUILD_ROOT |
195 | ||
196 | %py_comp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c | |
197 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c | |
198 | %py_postclean | |
199 | ||
200 | %clean | |
201 | rm -rf $RPM_BUILD_ROOT | |
202 | ||
203 | %post libs -p /sbin/ldconfig | |
204 | %postun libs -p /sbin/ldconfig | |
205 | ||
206 | %files | |
207 | %defattr(644,root,root,755) | |
208 | %attr(755,root,root) %{_bindir}/createrepo_c | |
209 | %attr(755,root,root) %{_bindir}/mergerepo_c | |
210 | %attr(755,root,root) %{_bindir}/modifyrepo_c | |
807f0e8d | 211 | %attr(755,root,root) %{_bindir}/sqliterepo_c |
eb85e3be JB |
212 | %{_mandir}/man8/createrepo_c.8* |
213 | %{_mandir}/man8/mergerepo_c.8* | |
7ab42891 | 214 | %{_mandir}/man8/modifyrepo_c.8* |
807f0e8d | 215 | %{_mandir}/man8/sqliterepo_c.8* |
eb85e3be JB |
216 | |
217 | %files libs | |
218 | %defattr(644,root,root,755) | |
219 | %doc AUTHORS README.md | |
220 | %attr(755,root,root) %{_libdir}/libcreaterepo_c.so.*.*.* | |
221 | %attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.0 | |
222 | ||
223 | %files devel | |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_libdir}/libcreaterepo_c.so | |
226 | %{_pkgconfigdir}/createrepo_c.pc | |
227 | %{_includedir}/createrepo_c | |
228 | ||
229 | %files apidocs | |
230 | %defattr(644,root,root,755) | |
807f0e8d | 231 | %doc build/doc/html |
eb85e3be JB |
232 | |
233 | %files -n python-createrepo_c | |
234 | %defattr(644,root,root,755) | |
235 | %dir %{py_sitedir}/createrepo_c | |
807f0e8d | 236 | %attr(755,root,root) %{py_sitedir}/createrepo_c/_createrepo_c.so |
eb85e3be JB |
237 | %{py_sitedir}/createrepo_c/__init__.py[co] |
238 | ||
807f0e8d JB |
239 | %if %{with python3} |
240 | %files -n python3-createrepo_c | |
241 | %defattr(644,root,root,755) | |
242 | %dir %{py3_sitedir}/createrepo_c | |
243 | %attr(755,root,root) %{py3_sitedir}/createrepo_c/_createrepo_c.so | |
244 | %{py3_sitedir}/createrepo_c/__init__.py | |
245 | %{py3_sitedir}/createrepo_c/__pycache__ | |
246 | %endif | |
247 | ||
eb85e3be JB |
248 | %files -n bash-completion-createrepo_c |
249 | %defattr(644,root,root,755) | |
bd7532a4 JB |
250 | %{bash_compdir}/createrepo_c |
251 | %{bash_compdir}/mergerepo_c | |
252 | %{bash_compdir}/modifyrepo_c | |
253 | %{bash_compdir}/sqliterepo_c |