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