]>
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 |
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 |
ee998a29 | 17 | # Source0-md5: 1d7ff7d5073af49108590ab6df1d9931 |
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 | 30 | # with .pc file |
ee998a29 | 31 | BuildRequires: itstool |
8b8e807c | 32 | BuildRequires: lmdb-devel >= 0.9.24-1 |
3f9a936d | 33 | BuildRequires: meson >= 0.48 |
8b8e807c | 34 | BuildRequires: ninja >= 1.5 |
93b0aff6 | 35 | BuildRequires: pkgconfig |
d13055f2 JB |
36 | BuildRequires: python3 >= 1:3 |
37 | BuildRequires: rpm-build >= 4.6 | |
1e1c6ee8 | 38 | BuildRequires: rpmbuild(macros) >= 1.750 |
a39ea102 | 39 | BuildRequires: sed >= 4 |
ca5d3962 | 40 | BuildRequires: tar >= 1:1.22 |
93b0aff6 | 41 | %{?with_vala:BuildRequires: vala} |
7564e8ae | 42 | BuildRequires: xmlto |
ca5d3962 | 43 | BuildRequires: xz |
4c88c945 | 44 | BuildRequires: yaml-devel >= 0.1 |
112490e9 | 45 | %if %{with qt} |
112490e9 | 46 | BuildRequires: Qt5Core-devel >= 5.0 |
5b67432b | 47 | BuildRequires: Qt5Test-devel >= 5.0 |
7564e8ae | 48 | BuildRequires: qt5-build >= 5.0 |
112490e9 JB |
49 | BuildRequires: qt5-qmake >= 5.0 |
50 | %endif | |
1e1c6ee8 JB |
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 | |
901ea3b7 | 59 | Requires: curl-libs >= 7.62 |
3f9a936d | 60 | Requires: glib2 >= 1:2.58 |
25610b54 | 61 | Obsoletes: PackageKit-plugin-appstream < 0.7.4 |
93b0aff6 JB |
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} | |
3f9a936d | 77 | Requires: glib2-devel >= 1:2.58 |
93b0aff6 JB |
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 | ||
3ed65cc2 JB |
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 | ||
1e1c6ee8 JB |
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 | ||
93b0aff6 JB |
111 | %package apidocs |
112 | Summary: AppStream API documentation | |
113 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
114 | Group: Documentation | |
e119917a | 115 | BuildArch: noarch |
93b0aff6 JB |
116 | |
117 | %description apidocs | |
118 | API documentation for AppStream library. | |
119 | ||
120 | %description apidocs -l pl.UTF-8 | |
121 | Dokumentacja API biblioteki AppStream. | |
122 | ||
1e1c6ee8 JB |
123 | %package compose |
124 | Summary: AppStreamCompose library | |
125 | Summary(pl.UTF-8): Biblioteka AppStreamCompose | |
126 | Group: Libraries | |
127 | Requires: %{name} = %{version}-%{release} | |
901ea3b7 | 128 | Requires: cairo >= 1.12 |
1e1c6ee8 JB |
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 | ||
ca5d3962 | 163 | %package qt |
3ed65cc2 JB |
164 | Summary: AppStreamQt library |
165 | Summary(pl.UTF-8): Biblioteka AppStreamQt | |
ca5d3962 | 166 | Group: Libraries |
1e1c6ee8 | 167 | Requires: %{name} = %{version}-%{release} |
112490e9 | 168 | Requires: Qt5Core >= 5.0 |
ca5d3962 JB |
169 | |
170 | %description qt | |
3ed65cc2 | 171 | AppStreamQt library. |
ca5d3962 JB |
172 | |
173 | %description qt -l pl.UTF-8 | |
3ed65cc2 | 174 | Biblioteka AppStreamQt. |
ca5d3962 JB |
175 | |
176 | %package qt-devel | |
3ed65cc2 JB |
177 | Summary: Header files for AppStreamQt library |
178 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStreamQt | |
ca5d3962 JB |
179 | Group: Libraries |
180 | Requires: %{name}-qt = %{version}-%{release} | |
112490e9 | 181 | Requires: Qt5Core-devel >= 5.0 |
ca5d3962 JB |
182 | |
183 | %description qt-devel | |
3ed65cc2 | 184 | Header files for AppStreamQt library. |
ca5d3962 JB |
185 | |
186 | %description qt-devel -l pl.UTF-8 | |
3ed65cc2 JB |
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. | |
ca5d3962 | 200 | |
10308cd0 JB |
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 | ||
93b0aff6 JB |
213 | %prep |
214 | %setup -q | |
215 | ||
1e1c6ee8 | 216 | %if "%{_ver_lt '%{cc_version}' '9.0'}" == "1" |
a39ea102 JB |
217 | %{__sed} -i -e "s/'-Wno-error=deprecated-copy', //" meson.build |
218 | %endif | |
219 | ||
93b0aff6 | 220 | %build |
739d45ae | 221 | %meson build \ |
739d45ae | 222 | %{?with_apt:-Dapt-support=true} \ |
1e1c6ee8 JB |
223 | %{?with_compose:-Dcompose=true} \ |
224 | %{?with_apidocs:-Ddocs=true} \ | |
739d45ae | 225 | -Dgir=true \ |
1e1c6ee8 | 226 | %{?with_qt:-Dqt=true} \ |
739d45ae JB |
227 | -Dstemming=true \ |
228 | %{?with_vala:-Dvapi=true} | |
93b0aff6 | 229 | |
1e1c6ee8 | 230 | %ninja_build -C build |
93b0aff6 JB |
231 | |
232 | %install | |
233 | rm -rf $RPM_BUILD_ROOT | |
234 | ||
1e1c6ee8 | 235 | %ninja_install -C build |
93b0aff6 | 236 | |
ca5d3962 JB |
237 | install -d $RPM_BUILD_ROOT%{_docdir} |
238 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
239 | ||
01b30368 JB |
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 | ||
ca5d3962 JB |
245 | %find_lang appstream |
246 | ||
93b0aff6 JB |
247 | %clean |
248 | rm -rf $RPM_BUILD_ROOT | |
249 | ||
250 | %post -p /sbin/ldconfig | |
251 | %postun -p /sbin/ldconfig | |
252 | ||
1e1c6ee8 JB |
253 | %post compose -p /sbin/ldconfig |
254 | %postun compose -p /sbin/ldconfig | |
255 | ||
ca5d3962 JB |
256 | %post qt -p /sbin/ldconfig |
257 | %postun qt -p /sbin/ldconfig | |
258 | ||
259 | %files -f appstream.lang | |
93b0aff6 | 260 | %defattr(644,root,root,755) |
4c88c945 | 261 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 262 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 263 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
7564e8ae | 264 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4 |
b32aecaf | 265 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib |
93b0aff6 | 266 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
7564e8ae | 267 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml |
b32aecaf JB |
268 | %if %{with apt} |
269 | /etc/apt/apt.conf.d/50appstream | |
270 | %endif | |
c478a3e4 | 271 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
272 | |
273 | %files devel | |
274 | %defattr(644,root,root,755) | |
275 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 276 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
739d45ae | 277 | %{_includedir}/appstream |
93b0aff6 JB |
278 | %{_pkgconfigdir}/appstream.pc |
279 | ||
3ed65cc2 JB |
280 | %files static |
281 | %defattr(644,root,root,755) | |
282 | %{_libdir}/libappstream.a | |
283 | ||
1e1c6ee8 JB |
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 | ||
93b0aff6 JB |
291 | %if %{with apidocs} |
292 | %files apidocs | |
293 | %defattr(644,root,root,755) | |
112490e9 | 294 | %{_docdir}/appstream |
ca5d3962 JB |
295 | %{_gtkdocdir}/appstream |
296 | %endif | |
297 | ||
1e1c6ee8 JB |
298 | %if %{with compose} |
299 | %files compose | |
300 | %defattr(644,root,root,755) | |
25610b54 | 301 | %attr(755,root,root) %{_libexecdir}/appstreamcli-compose |
1e1c6ee8 JB |
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 | |
25610b54 JB |
305 | %{_datadir}/metainfo/org.freedesktop.appstream.compose.metainfo.xml |
306 | %{_mandir}/man1/appstreamcli-compose.1* | |
1e1c6ee8 JB |
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 | ||
ca5d3962 JB |
320 | %if %{with qt} |
321 | %files qt | |
322 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
323 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* |
324 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
ca5d3962 JB |
325 | |
326 | %files qt-devel | |
327 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
328 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so |
329 | %{_includedir}/AppStreamQt | |
330 | %{_libdir}/cmake/AppStreamQt | |
3ed65cc2 JB |
331 | |
332 | %files qt-static | |
333 | %defattr(644,root,root,755) | |
334 | %{_libdir}/libAppStreamQt.a | |
93b0aff6 JB |
335 | %endif |
336 | ||
10308cd0 JB |
337 | %files -n gettext-its-metainfo |
338 | %defattr(644,root,root,755) | |
10308cd0 JB |
339 | %{_datadir}/gettext/its/metainfo.its |
340 | %{_datadir}/gettext/its/metainfo.loc |