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