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