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