]>
Commit | Line | Data |
---|---|---|
93b0aff6 JB |
1 | # |
2 | # Conditional build: | |
d13055f2 | 3 | %bcond_without apidocs # API documentation |
b32aecaf | 4 | %bcond_with apt # Debian/APT support |
1e1c6ee8 | 5 | %bcond_without compose # appstream-compose library |
43479ffd JB |
6 | %bcond_without qt # Qt libraries (any) |
7 | %bcond_without qt5 # Qt5 library (libAppStreamQt5) | |
8 | %bcond_without qt6 # Qt6 library (libAppStreamQt) | |
93b0aff6 | 9 | %bcond_without vala # Vala API (VAPI) |
e119917a | 10 | |
43479ffd JB |
11 | %if %{without qt} |
12 | %undefine with_qt5 | |
13 | %undefine with_qt6 | |
14 | %endif | |
93b0aff6 JB |
15 | Summary: AppStream-Core library and tools |
16 | Summary(pl.UTF-8): Biblioteka i narzędzia AppStream-Core | |
17 | Name: AppStream | |
fe80581d | 18 | Version: 1.0.2 |
573721ce | 19 | Release: 2 |
ca5d3962 | 20 | License: LGPL v2.1+ |
93b0aff6 | 21 | Group: Libraries |
10308cd0 | 22 | Source0: https://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz |
fe80581d | 23 | # Source0-md5: 00e749276887f816b6d68a7a150e6c97 |
10308cd0 | 24 | URL: https://www.freedesktop.org/wiki/Distributions/AppStream/ |
901ea3b7 | 25 | BuildRequires: curl-devel >= 7.62 |
d13055f2 | 26 | %{?with_apidocs:BuildRequires: daps} |
739d45ae | 27 | BuildRequires: docbook-style-xsl-nons |
6395dea7 | 28 | BuildRequires: gettext-tools |
fe80581d | 29 | %{?with_apidocs:BuildRequires: gi-docgen} |
d828836a | 30 | BuildRequires: glib2-devel >= 1:2.62 |
d13055f2 | 31 | BuildRequires: gobject-introspection-devel >= 1.56 |
3ed65cc2 | 32 | BuildRequires: gperf |
395d7c19 | 33 | %{?with_apidocs:BuildRequires: gtk-doc} |
3c5f4f9c | 34 | BuildRequires: itstool |
8b8e807c | 35 | BuildRequires: libstdc++-devel >= 6:5 |
7564e8ae | 36 | BuildRequires: libstemmer-devel |
93b0aff6 | 37 | BuildRequires: libxml2-devel >= 2.0 |
6ed2f059 | 38 | BuildRequires: libxmlb-devel >= 0.3.14 |
739d45ae | 39 | BuildRequires: libxslt-progs |
d828836a | 40 | # with .pc file |
8b8e807c | 41 | BuildRequires: lmdb-devel >= 0.9.24-1 |
d828836a | 42 | BuildRequires: meson >= 0.62 |
8b8e807c | 43 | BuildRequires: ninja >= 1.5 |
93b0aff6 | 44 | BuildRequires: pkgconfig |
d13055f2 JB |
45 | BuildRequires: python3 >= 1:3 |
46 | BuildRequires: rpm-build >= 4.6 | |
1e1c6ee8 | 47 | BuildRequires: rpmbuild(macros) >= 1.750 |
a39ea102 | 48 | BuildRequires: sed >= 4 |
d828836a | 49 | BuildRequires: systemd-devel >= 1:209 |
ca5d3962 | 50 | BuildRequires: tar >= 1:1.22 |
93b0aff6 | 51 | %{?with_vala:BuildRequires: vala} |
7564e8ae | 52 | BuildRequires: xmlto |
ca5d3962 | 53 | BuildRequires: xz |
4c88c945 | 54 | BuildRequires: yaml-devel >= 0.1 |
6ed2f059 | 55 | BuildRequires: zstd-devel |
43479ffd JB |
56 | %if %{with qt5} |
57 | BuildRequires: Qt5Core-devel >= 5.15 | |
58 | BuildRequires: Qt5Test-devel >= 5.15 | |
59 | BuildRequires: qt5-build >= 5.15 | |
60 | BuildRequires: qt5-qmake >= 5.15 | |
61 | %endif | |
fe80581d | 62 | %if %{with qt6} |
43479ffd JB |
63 | BuildRequires: Qt6Core-devel >= 6.2.4 |
64 | BuildRequires: Qt6Test-devel >= 6.2.4 | |
65 | BuildRequires: qt6-build >= 6.2.4 | |
66 | BuildRequires: qt6-qmake >= 6.2.4 | |
112490e9 | 67 | %endif |
1e1c6ee8 JB |
68 | %if %{with compose} |
69 | BuildRequires: cairo-devel >= 1.12 | |
70 | BuildRequires: fontconfig-devel | |
71 | BuildRequires: freetype-devel >= 2 | |
72 | BuildRequires: gdk-pixbuf2-devel >= 2.0 | |
d828836a | 73 | BuildRequires: librsvg-devel >= 2.48 |
1e1c6ee8 JB |
74 | BuildRequires: pango-devel |
75 | %endif | |
901ea3b7 | 76 | Requires: curl-libs >= 7.62 |
d828836a | 77 | Requires: glib2 >= 1:2.62 |
6ed2f059 | 78 | Requires: libxmlb >= 0.3.14 |
25610b54 | 79 | Obsoletes: PackageKit-plugin-appstream < 0.7.4 |
93b0aff6 JB |
80 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
81 | ||
82 | %description | |
83 | AppStream-Core library and tools to access the AppStream component | |
84 | database. | |
85 | ||
86 | %description -l pl.UTF-8 | |
87 | Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy | |
88 | danych komponentu AppStream. | |
89 | ||
90 | %package devel | |
91 | Summary: Header files for AppStream library | |
92 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStream | |
93 | Group: Development/Libraries | |
94 | Requires: %{name} = %{version}-%{release} | |
d828836a | 95 | Requires: glib2-devel >= 1:2.62 |
93b0aff6 JB |
96 | |
97 | %description devel | |
98 | Header files for AppStream library. | |
99 | ||
100 | %description devel -l pl.UTF-8 | |
101 | Pliki nagłówkowe biblioteki AppStream. | |
102 | ||
3ed65cc2 JB |
103 | %package static |
104 | Summary: Static AppStream library | |
105 | Summary(pl.UTF-8): Statyczna biblioteka AppStream | |
106 | Group: Development/Libraries | |
107 | Requires: %{name}-devel = %{version}-%{release} | |
108 | ||
109 | %description static | |
110 | Static AppStream library. | |
111 | ||
112 | %description static -l pl.UTF-8 | |
113 | Statyczna biblioteka AppStream. | |
114 | ||
1e1c6ee8 JB |
115 | %package -n vala-appstream |
116 | Summary: Vala API for AppStream library | |
117 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
118 | Group: Development/Libraries | |
119 | Requires: %{name}-devel = %{version}-%{release} | |
120 | Requires: vala | |
121 | BuildArch: noarch | |
122 | ||
123 | %description -n vala-appstream | |
124 | Vala API for AppStream library. | |
125 | ||
126 | %description -n vala-appstream -l pl.UTF-8 | |
127 | API języka Vala do biblioteki AppStream. | |
128 | ||
93b0aff6 JB |
129 | %package apidocs |
130 | Summary: AppStream API documentation | |
131 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
132 | Group: Documentation | |
e119917a | 133 | BuildArch: noarch |
93b0aff6 JB |
134 | |
135 | %description apidocs | |
136 | API documentation for AppStream library. | |
137 | ||
138 | %description apidocs -l pl.UTF-8 | |
139 | Dokumentacja API biblioteki AppStream. | |
140 | ||
1e1c6ee8 JB |
141 | %package compose |
142 | Summary: AppStreamCompose library | |
143 | Summary(pl.UTF-8): Biblioteka AppStreamCompose | |
144 | Group: Libraries | |
145 | Requires: %{name} = %{version}-%{release} | |
901ea3b7 | 146 | Requires: cairo >= 1.12 |
d828836a | 147 | Requires: librsvg >= 2.48 |
1e1c6ee8 JB |
148 | |
149 | %description compose | |
150 | AppStreamCompose library contains helper functions to generate | |
151 | AppStream metadata and auxiliary data. | |
152 | ||
153 | %description compose -l pl.UTF-8 | |
154 | Biblioteka AppStreamCompose zawiera funkcje pomocnicze do generowania | |
155 | metadanych AppStream oraz danych pomocniczych. | |
156 | ||
157 | %package compose-devel | |
158 | Summary: Header files for AppStreamCompose library | |
159 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStreamCompose | |
160 | Group: Development/Libraries | |
161 | Requires: %{name}-compose = %{version}-%{release} | |
162 | Requires: %{name}-devel = %{version}-%{release} | |
163 | ||
164 | %description compose-devel | |
165 | Header files for AppStreamCompose library. | |
166 | ||
167 | %description compose-devel -l pl.UTF-8 | |
168 | Pliki nagłówkowe biblioteki AppStreamCompose. | |
169 | ||
170 | %package compose-static | |
171 | Summary: Static AppStreamCompose library | |
172 | Summary(pl.UTF-8): Statyczna biblioteka AppStreamCompose | |
173 | Group: Development/Libraries | |
174 | Requires: %{name}-compose-devel = %{version}-%{release} | |
175 | ||
176 | %description compose-static | |
177 | Static AppStreamCompose library. | |
178 | ||
179 | %description compose-static -l pl.UTF-8 | |
180 | Statyczna biblioteka AppStreamCompose. | |
181 | ||
43479ffd JB |
182 | %package qt5 |
183 | Summary: AppStreamQt5 library | |
184 | Summary(pl.UTF-8): Biblioteka AppStreamQt5 | |
185 | Group: Libraries | |
186 | Requires: %{name} = %{version}-%{release} | |
187 | Requires: Qt5Core >= 5.15 | |
188 | Obsoletes: AppStream-qt < 1 | |
189 | ||
190 | %description qt5 | |
191 | AppStreamQt5 library. | |
192 | ||
193 | %description qt5 -l pl.UTF-8 | |
194 | Biblioteka AppStreamQt5. | |
195 | ||
196 | %package qt5-devel | |
197 | Summary: Header files for AppStreamQt5 library | |
198 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStreamQt5 | |
199 | Group: Libraries | |
200 | Requires: %{name}-devel = %{version}-%{release} | |
201 | Requires: %{name}-qt5 = %{version}-%{release} | |
202 | Requires: Qt5Core-devel >= 5.15 | |
203 | Obsoletes: AppStream-qt-devel < 1 | |
204 | ||
205 | %description qt5-devel | |
206 | Header files for AppStreamQt5 library. | |
207 | ||
208 | %description qt5-devel -l pl.UTF-8 | |
209 | Pliki nagłówkowe biblioteki AppStreamQt5. | |
210 | ||
211 | %package qt5-static | |
212 | Summary: Static AppStreamQt5 library | |
213 | Summary(pl.UTF-8): Statyczna biblioteka AppStreamQt5 | |
214 | Group: Development/Libraries | |
215 | Requires: %{name}-qt5-devel = %{version}-%{release} | |
216 | Obsoletes: AppStream-qt-static < 1 | |
217 | ||
218 | %description qt5-static | |
219 | Static AppStreamQt5 library. | |
220 | ||
221 | %description qt5-static -l pl.UTF-8 | |
222 | Statyczna biblioteka AppStreamQt5. | |
223 | ||
fe80581d | 224 | %package qt6 |
3ed65cc2 JB |
225 | Summary: AppStreamQt library |
226 | Summary(pl.UTF-8): Biblioteka AppStreamQt | |
ca5d3962 | 227 | Group: Libraries |
1e1c6ee8 | 228 | Requires: %{name} = %{version}-%{release} |
43479ffd | 229 | Requires: Qt6Core >= 6.2.4 |
ca5d3962 | 230 | |
fe80581d | 231 | %description qt6 |
3ed65cc2 | 232 | AppStreamQt library. |
ca5d3962 | 233 | |
fe80581d | 234 | %description qt6 -l pl.UTF-8 |
3ed65cc2 | 235 | Biblioteka AppStreamQt. |
ca5d3962 | 236 | |
fe80581d | 237 | %package qt6-devel |
3ed65cc2 JB |
238 | Summary: Header files for AppStreamQt library |
239 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStreamQt | |
ca5d3962 | 240 | Group: Libraries |
43479ffd | 241 | Requires: %{name}-devel = %{version}-%{release} |
fe80581d | 242 | Requires: %{name}-qt6 = %{version}-%{release} |
43479ffd | 243 | Requires: Qt6Core-devel >= 6.2.4 |
ca5d3962 | 244 | |
fe80581d | 245 | %description qt6-devel |
3ed65cc2 | 246 | Header files for AppStreamQt library. |
ca5d3962 | 247 | |
fe80581d | 248 | %description qt6-devel -l pl.UTF-8 |
3ed65cc2 JB |
249 | Pliki nagłówkowe biblioteki AppStreamQt. |
250 | ||
fe80581d | 251 | %package qt6-static |
3ed65cc2 JB |
252 | Summary: Static AppStreamQt library |
253 | Summary(pl.UTF-8): Statyczna biblioteka AppStreamQt | |
254 | Group: Development/Libraries | |
43479ffd | 255 | Requires: %{name}-qt6-devel = %{version}-%{release} |
3ed65cc2 | 256 | |
fe80581d | 257 | %description qt6-static |
3ed65cc2 JB |
258 | Static AppStreamQt library. |
259 | ||
fe80581d | 260 | %description qt6-static -l pl.UTF-8 |
3ed65cc2 | 261 | Statyczna biblioteka AppStreamQt. |
ca5d3962 | 262 | |
10308cd0 JB |
263 | %package -n gettext-its-metainfo |
264 | Summary: AppStream metainfo ITS data for gettext tools | |
265 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
266 | Group: Development/Tools | |
267 | Requires: gettext-tools >= 0.19 | |
268 | ||
269 | %description -n gettext-its-metainfo | |
270 | AppStream metainfo ITS data for gettext tools. | |
271 | ||
272 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
273 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
274 | ||
93b0aff6 JB |
275 | %prep |
276 | %setup -q | |
a39ea102 | 277 | |
93b0aff6 | 278 | %build |
739d45ae | 279 | %meson build \ |
395d7c19 | 280 | -Dapidocs=%{__true_false apidocs} \ |
739d45ae | 281 | %{?with_apt:-Dapt-support=true} \ |
1e1c6ee8 | 282 | %{?with_compose:-Dcompose=true} \ |
395d7c19 | 283 | -Ddocs=%{__true_false apidocs} \ |
739d45ae | 284 | -Dgir=true \ |
43479ffd JB |
285 | %{?with_qt:-Dqt=true} \ |
286 | %{?with_qt:-Dqt-versions="[%{?with_qt5:'5'%{?with_qt6:,}}%{?with_qt6:'6'}]"} \ | |
739d45ae JB |
287 | -Dstemming=true \ |
288 | %{?with_vala:-Dvapi=true} | |
93b0aff6 | 289 | |
1e1c6ee8 | 290 | %ninja_build -C build |
93b0aff6 JB |
291 | |
292 | %install | |
293 | rm -rf $RPM_BUILD_ROOT | |
294 | ||
1e1c6ee8 | 295 | %ninja_install -C build |
93b0aff6 | 296 | |
ca5d3962 | 297 | install -d $RPM_BUILD_ROOT%{_docdir} |
dc6fe3db | 298 | %{?with_apidocs:%{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir}} |
ca5d3962 | 299 | |
d828836a | 300 | # unify; bn_BD is more complete than bn |
f776239f | 301 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/bn |
01b30368 JB |
302 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{bn_BD,bn} |
303 | # not supported by glibc | |
304 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{ain,rom} | |
305 | ||
5c7c6ff5 | 306 | # Unneeded test file |
3c5f4f9c | 307 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/installed-tests |
5c7c6ff5 | 308 | |
ca5d3962 JB |
309 | %find_lang appstream |
310 | ||
93b0aff6 JB |
311 | %clean |
312 | rm -rf $RPM_BUILD_ROOT | |
313 | ||
314 | %post -p /sbin/ldconfig | |
315 | %postun -p /sbin/ldconfig | |
316 | ||
1e1c6ee8 JB |
317 | %post compose -p /sbin/ldconfig |
318 | %postun compose -p /sbin/ldconfig | |
319 | ||
fe80581d WF |
320 | %post qt6 -p /sbin/ldconfig |
321 | %postun qt6 -p /sbin/ldconfig | |
ca5d3962 JB |
322 | |
323 | %files -f appstream.lang | |
93b0aff6 | 324 | %defattr(644,root,root,755) |
4c88c945 | 325 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 326 | %attr(755,root,root) %{_bindir}/appstreamcli |
fe80581d WF |
327 | %attr(755,root,root) %{_libdir}/libappstream.so.*.* |
328 | %ghost %{_libdir}/libappstream.so.5 | |
b32aecaf | 329 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib |
fe80581d | 330 | #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
7564e8ae | 331 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml |
b32aecaf | 332 | %if %{with apt} |
fe80581d | 333 | %{_sysconfdir}/apt/apt.conf.d/50appstream |
b32aecaf | 334 | %endif |
c478a3e4 | 335 | %{_mandir}/man1/appstreamcli.1* |
fe80581d WF |
336 | %dir %{_datadir}/appstream |
337 | %{_datadir}/appstream/appstream.conf | |
93b0aff6 JB |
338 | |
339 | %files devel | |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 342 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
739d45ae | 343 | %{_includedir}/appstream |
93b0aff6 JB |
344 | %{_pkgconfigdir}/appstream.pc |
345 | ||
3ed65cc2 JB |
346 | %files static |
347 | %defattr(644,root,root,755) | |
348 | %{_libdir}/libappstream.a | |
349 | ||
1e1c6ee8 JB |
350 | %if %{with vala} |
351 | %files -n vala-appstream | |
352 | %defattr(644,root,root,755) | |
353 | %{_datadir}/vala/vapi/appstream.deps | |
354 | %{_datadir}/vala/vapi/appstream.vapi | |
355 | %endif | |
356 | ||
93b0aff6 JB |
357 | %if %{with apidocs} |
358 | %files apidocs | |
359 | %defattr(644,root,root,755) | |
112490e9 | 360 | %{_docdir}/appstream |
ca5d3962 | 361 | %{_gtkdocdir}/appstream |
d828836a | 362 | %{_gtkdocdir}/appstream-compose |
ca5d3962 JB |
363 | %endif |
364 | ||
1e1c6ee8 JB |
365 | %if %{with compose} |
366 | %files compose | |
367 | %defattr(644,root,root,755) | |
25610b54 | 368 | %attr(755,root,root) %{_libexecdir}/appstreamcli-compose |
1e1c6ee8 JB |
369 | %attr(755,root,root) %{_libdir}/libappstream-compose.so.*.*.* |
370 | %attr(755,root,root) %ghost %{_libdir}/libappstream-compose.so.0 | |
371 | %{_libdir}/girepository-1.0/AppStreamCompose-1.0.typelib | |
25610b54 JB |
372 | %{_datadir}/metainfo/org.freedesktop.appstream.compose.metainfo.xml |
373 | %{_mandir}/man1/appstreamcli-compose.1* | |
1e1c6ee8 JB |
374 | |
375 | %files compose-devel | |
376 | %defattr(644,root,root,755) | |
377 | %attr(755,root,root) %{_libdir}/libappstream-compose.so | |
378 | %{_includedir}/appstream-compose | |
379 | %{_datadir}/gir-1.0/AppStreamCompose-1.0.gir | |
380 | %{_pkgconfigdir}/appstream-compose.pc | |
381 | ||
382 | %files compose-static | |
383 | %defattr(644,root,root,755) | |
384 | %{_libdir}/libappstream-compose.a | |
385 | %endif | |
386 | ||
43479ffd JB |
387 | %if %{with qt5} |
388 | %files qt5 | |
389 | %defattr(644,root,root,755) | |
390 | %attr(755,root,root) %{_libdir}/libAppStreamQt5.so.*.*.* | |
391 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt5.so.3 | |
392 | ||
393 | %files qt5-devel | |
394 | %defattr(644,root,root,755) | |
395 | %attr(755,root,root) %{_libdir}/libAppStreamQt5.so | |
396 | %{_includedir}/AppStreamQt5 | |
397 | %{_libdir}/cmake/AppStreamQt5 | |
398 | ||
399 | %files qt5-static | |
400 | %defattr(644,root,root,755) | |
401 | %{_libdir}/libAppStreamQt5.a | |
402 | %endif | |
403 | ||
fe80581d WF |
404 | %if %{with qt6} |
405 | %files qt6 | |
ca5d3962 | 406 | %defattr(644,root,root,755) |
fe80581d WF |
407 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.* |
408 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.3 | |
ca5d3962 | 409 | |
fe80581d | 410 | %files qt6-devel |
ca5d3962 | 411 | %defattr(644,root,root,755) |
3b6d4ef4 JB |
412 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so |
413 | %{_includedir}/AppStreamQt | |
414 | %{_libdir}/cmake/AppStreamQt | |
3ed65cc2 | 415 | |
fe80581d | 416 | %files qt6-static |
3ed65cc2 JB |
417 | %defattr(644,root,root,755) |
418 | %{_libdir}/libAppStreamQt.a | |
93b0aff6 JB |
419 | %endif |
420 | ||
10308cd0 JB |
421 | %files -n gettext-its-metainfo |
422 | %defattr(644,root,root,755) | |
10308cd0 JB |
423 | %{_datadir}/gettext/its/metainfo.its |
424 | %{_datadir}/gettext/its/metainfo.loc |