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