]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation build | |
4 | %bcond_with apt # Debian/APT support | |
5 | %bcond_without qt # Qt library (libappstream-qt) | |
6 | %bcond_without vala # Vala API (VAPI) | |
7 | ||
8 | Summary: AppStream-Core library and tools | |
9 | Summary(pl.UTF-8): Biblioteka i narzędzia AppStream-Core | |
10 | Name: AppStream | |
11 | Version: 0.12.10 | |
12 | Release: 1 | |
13 | License: LGPL v2.1+ | |
14 | Group: Libraries | |
15 | Source0: https://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz | |
16 | # Source0-md5: cd27ff2139bef3942529d9bd5329fd3a | |
17 | URL: https://www.freedesktop.org/wiki/Distributions/AppStream/ | |
18 | BuildRequires: docbook-style-xsl-nons | |
19 | BuildRequires: gettext-tools | |
20 | BuildRequires: glib2-devel >= 1:2.58 | |
21 | BuildRequires: gobject-introspection-devel >= 1.54 | |
22 | BuildRequires: gperf | |
23 | BuildRequires: itstool | |
24 | BuildRequires: libsoup-devel >= 2.56 | |
25 | BuildRequires: libstdc++-devel >= 6:5 | |
26 | BuildRequires: libstemmer-devel | |
27 | BuildRequires: libxml2-devel >= 2.0 | |
28 | BuildRequires: libxslt-progs | |
29 | # with .pc file | |
30 | BuildRequires: lmdb-devel >= 0.9.24-1 | |
31 | BuildRequires: meson >= 0.48 | |
32 | BuildRequires: ninja >= 1.5 | |
33 | BuildRequires: pkgconfig | |
34 | BuildRequires: rpmbuild(macros) >= 1.727 | |
35 | BuildRequires: sed >= 4 | |
36 | BuildRequires: tar >= 1:1.22 | |
37 | %{?with_vala:BuildRequires: vala} | |
38 | BuildRequires: xmlto | |
39 | BuildRequires: xz | |
40 | BuildRequires: yaml-devel >= 0.1 | |
41 | %if %{with qt} | |
42 | BuildRequires: Qt5Core-devel >= 5.0 | |
43 | BuildRequires: Qt5Test-devel >= 5.0 | |
44 | BuildRequires: qt5-build >= 5.0 | |
45 | BuildRequires: qt5-qmake >= 5.0 | |
46 | %endif | |
47 | %if %{with apidocs} | |
48 | BuildRequires: gtk-doc | |
49 | BuildRequires: publican | |
50 | BuildRequires: python3 | |
51 | %endif | |
52 | Requires: glib2 >= 1:2.58 | |
53 | Requires: libsoup >= 2.56 | |
54 | Obsoletes: PackageKit-plugin-appstream | |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
56 | ||
57 | %description | |
58 | AppStream-Core library and tools to access the AppStream component | |
59 | database. | |
60 | ||
61 | %description -l pl.UTF-8 | |
62 | Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy | |
63 | danych komponentu AppStream. | |
64 | ||
65 | %package devel | |
66 | Summary: Header files for AppStream library | |
67 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStream | |
68 | Group: Development/Libraries | |
69 | Requires: %{name} = %{version}-%{release} | |
70 | Requires: glib2-devel >= 1:2.58 | |
71 | ||
72 | %description devel | |
73 | Header files for AppStream library. | |
74 | ||
75 | %description devel -l pl.UTF-8 | |
76 | Pliki nagłówkowe biblioteki AppStream. | |
77 | ||
78 | %package static | |
79 | Summary: Static AppStream library | |
80 | Summary(pl.UTF-8): Statyczna biblioteka AppStream | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | ||
84 | %description static | |
85 | Static AppStream library. | |
86 | ||
87 | %description static -l pl.UTF-8 | |
88 | Statyczna biblioteka AppStream. | |
89 | ||
90 | %package apidocs | |
91 | Summary: AppStream API documentation | |
92 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
93 | Group: Documentation | |
94 | BuildArch: noarch | |
95 | ||
96 | %description apidocs | |
97 | API documentation for AppStream library. | |
98 | ||
99 | %description apidocs -l pl.UTF-8 | |
100 | Dokumentacja API biblioteki AppStream. | |
101 | ||
102 | %package qt | |
103 | Summary: AppStreamQt library | |
104 | Summary(pl.UTF-8): Biblioteka AppStreamQt | |
105 | Group: Libraries | |
106 | Requires: Qt5Core >= 5.0 | |
107 | ||
108 | %description qt | |
109 | AppStreamQt library. | |
110 | ||
111 | %description qt -l pl.UTF-8 | |
112 | Biblioteka AppStreamQt. | |
113 | ||
114 | %package qt-devel | |
115 | Summary: Header files for AppStreamQt library | |
116 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStreamQt | |
117 | Group: Libraries | |
118 | Requires: %{name}-qt = %{version}-%{release} | |
119 | Requires: Qt5Core-devel >= 5.0 | |
120 | ||
121 | %description qt-devel | |
122 | Header files for AppStreamQt library. | |
123 | ||
124 | %description qt-devel -l pl.UTF-8 | |
125 | Pliki nagłówkowe biblioteki AppStreamQt. | |
126 | ||
127 | %package qt-static | |
128 | Summary: Static AppStreamQt library | |
129 | Summary(pl.UTF-8): Statyczna biblioteka AppStreamQt | |
130 | Group: Development/Libraries | |
131 | Requires: %{name}-devel = %{version}-%{release} | |
132 | ||
133 | %description qt-static | |
134 | Static AppStreamQt library. | |
135 | ||
136 | %description qt-static -l pl.UTF-8 | |
137 | Statyczna biblioteka AppStreamQt. | |
138 | ||
139 | %package -n gettext-its-metainfo | |
140 | Summary: AppStream metainfo ITS data for gettext tools | |
141 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
142 | Group: Development/Tools | |
143 | Requires: gettext-tools >= 0.19 | |
144 | ||
145 | %description -n gettext-its-metainfo | |
146 | AppStream metainfo ITS data for gettext tools. | |
147 | ||
148 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
149 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
150 | ||
151 | %package -n vala-appstream | |
152 | Summary: Vala API for AppStream library | |
153 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
154 | Group: Development/Libraries | |
155 | Requires: %{name}-devel = %{version}-%{release} | |
156 | Requires: vala | |
157 | BuildArch: noarch | |
158 | ||
159 | %description -n vala-appstream | |
160 | Vala API for AppStream library. | |
161 | ||
162 | %description -n vala-appstream -l pl.UTF-8 | |
163 | API języka Vala do biblioteki AppStream. | |
164 | ||
165 | %prep | |
166 | %setup -q | |
167 | ||
168 | %if "%{cc_version}" < "9.0" | |
169 | %{__sed} -i -e "s/'-Wno-error=deprecated-copy', //" meson.build | |
170 | %endif | |
171 | ||
172 | %build | |
173 | %meson build \ | |
174 | %{?with_apidocs:-Ddocs=true} \ | |
175 | %{?with_apt:-Dapt-support=true} \ | |
176 | %{?with_qt:-Dqt=true} \ | |
177 | -Dgir=true \ | |
178 | -Dstemming=true \ | |
179 | %{?with_vala:-Dvapi=true} | |
180 | ||
181 | %meson_build -C build | |
182 | ||
183 | %install | |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | ||
186 | %meson_install -C build | |
187 | ||
188 | install -d $RPM_BUILD_ROOT%{_docdir} | |
189 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
190 | ||
191 | %find_lang appstream | |
192 | ||
193 | %clean | |
194 | rm -rf $RPM_BUILD_ROOT | |
195 | ||
196 | %post -p /sbin/ldconfig | |
197 | %postun -p /sbin/ldconfig | |
198 | ||
199 | %post qt -p /sbin/ldconfig | |
200 | %postun qt -p /sbin/ldconfig | |
201 | ||
202 | %files -f appstream.lang | |
203 | %defattr(644,root,root,755) | |
204 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE | |
205 | %attr(755,root,root) %{_bindir}/appstreamcli | |
206 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* | |
207 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4 | |
208 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib | |
209 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf | |
210 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml | |
211 | %if %{with apt} | |
212 | /etc/apt/apt.conf.d/50appstream | |
213 | %endif | |
214 | %{_mandir}/man1/appstreamcli.1* | |
215 | ||
216 | %files devel | |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_libdir}/libappstream.so | |
219 | %{_datadir}/gir-1.0/AppStream-1.0.gir | |
220 | %{_includedir}/appstream | |
221 | %{_pkgconfigdir}/appstream.pc | |
222 | ||
223 | %files static | |
224 | %defattr(644,root,root,755) | |
225 | %{_libdir}/libappstream.a | |
226 | ||
227 | %if %{with apidocs} | |
228 | %files apidocs | |
229 | %defattr(644,root,root,755) | |
230 | %{_docdir}/appstream | |
231 | %{_gtkdocdir}/appstream | |
232 | %endif | |
233 | ||
234 | %if %{with qt} | |
235 | %files qt | |
236 | %defattr(644,root,root,755) | |
237 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* | |
238 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
239 | ||
240 | %files qt-devel | |
241 | %defattr(644,root,root,755) | |
242 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so | |
243 | %{_includedir}/AppStreamQt | |
244 | %{_libdir}/cmake/AppStreamQt | |
245 | ||
246 | %files qt-static | |
247 | %defattr(644,root,root,755) | |
248 | %{_libdir}/libAppStreamQt.a | |
249 | %endif | |
250 | ||
251 | %files -n gettext-its-metainfo | |
252 | %defattr(644,root,root,755) | |
253 | %{_datadir}/gettext/its/metainfo.its | |
254 | %{_datadir}/gettext/its/metainfo.loc | |
255 | ||
256 | %if %{with vala} | |
257 | %files -n vala-appstream | |
258 | %defattr(644,root,root,755) | |
259 | %{_datadir}/vala/vapi/appstream.deps | |
260 | %{_datadir}/vala/vapi/appstream.vapi | |
261 | %endif |