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