]>
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 | |
e119917a | 94 | BuildArch: noarch |
93b0aff6 JB |
95 | |
96 | %description apidocs | |
97 | API documentation for AppStream library. | |
98 | ||
99 | %description apidocs -l pl.UTF-8 | |
100 | Dokumentacja API biblioteki AppStream. | |
101 | ||
ca5d3962 | 102 | %package qt |
3ed65cc2 JB |
103 | Summary: AppStreamQt library |
104 | Summary(pl.UTF-8): Biblioteka AppStreamQt | |
ca5d3962 | 105 | Group: Libraries |
112490e9 | 106 | Requires: Qt5Core >= 5.0 |
ca5d3962 JB |
107 | |
108 | %description qt | |
3ed65cc2 | 109 | AppStreamQt library. |
ca5d3962 JB |
110 | |
111 | %description qt -l pl.UTF-8 | |
3ed65cc2 | 112 | Biblioteka AppStreamQt. |
ca5d3962 JB |
113 | |
114 | %package qt-devel | |
3ed65cc2 JB |
115 | Summary: Header files for AppStreamQt library |
116 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStreamQt | |
ca5d3962 JB |
117 | Group: Libraries |
118 | Requires: %{name}-qt = %{version}-%{release} | |
112490e9 | 119 | Requires: Qt5Core-devel >= 5.0 |
ca5d3962 JB |
120 | |
121 | %description qt-devel | |
3ed65cc2 | 122 | Header files for AppStreamQt library. |
ca5d3962 JB |
123 | |
124 | %description qt-devel -l pl.UTF-8 | |
3ed65cc2 JB |
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. | |
ca5d3962 | 138 | |
10308cd0 JB |
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 | ||
93b0aff6 JB |
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 | |
36752e97 | 157 | BuildArch: noarch |
93b0aff6 JB |
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 | ||
93b0aff6 JB |
165 | %prep |
166 | %setup -q | |
167 | ||
a39ea102 JB |
168 | %if "%{cc_version}" < "9.0" |
169 | %{__sed} -i -e "s/'-Wno-error=deprecated-copy', //" meson.build | |
170 | %endif | |
171 | ||
93b0aff6 | 172 | %build |
739d45ae JB |
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} | |
93b0aff6 | 180 | |
739d45ae | 181 | %meson_build -C build |
93b0aff6 JB |
182 | |
183 | %install | |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | ||
739d45ae | 186 | %meson_install -C build |
93b0aff6 | 187 | |
ca5d3962 JB |
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 | ||
93b0aff6 JB |
193 | %clean |
194 | rm -rf $RPM_BUILD_ROOT | |
195 | ||
196 | %post -p /sbin/ldconfig | |
197 | %postun -p /sbin/ldconfig | |
198 | ||
ca5d3962 JB |
199 | %post qt -p /sbin/ldconfig |
200 | %postun qt -p /sbin/ldconfig | |
201 | ||
202 | %files -f appstream.lang | |
93b0aff6 | 203 | %defattr(644,root,root,755) |
4c88c945 | 204 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 205 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 206 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
7564e8ae | 207 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4 |
b32aecaf | 208 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib |
93b0aff6 | 209 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
7564e8ae | 210 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml |
b32aecaf JB |
211 | %if %{with apt} |
212 | /etc/apt/apt.conf.d/50appstream | |
213 | %endif | |
c478a3e4 | 214 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
215 | |
216 | %files devel | |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 219 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
739d45ae | 220 | %{_includedir}/appstream |
93b0aff6 JB |
221 | %{_pkgconfigdir}/appstream.pc |
222 | ||
3ed65cc2 JB |
223 | %files static |
224 | %defattr(644,root,root,755) | |
225 | %{_libdir}/libappstream.a | |
226 | ||
93b0aff6 JB |
227 | %if %{with apidocs} |
228 | %files apidocs | |
229 | %defattr(644,root,root,755) | |
112490e9 | 230 | %{_docdir}/appstream |
ca5d3962 JB |
231 | %{_gtkdocdir}/appstream |
232 | %endif | |
233 | ||
234 | %if %{with qt} | |
235 | %files qt | |
236 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
237 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* |
238 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
ca5d3962 JB |
239 | |
240 | %files qt-devel | |
241 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
242 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so |
243 | %{_includedir}/AppStreamQt | |
244 | %{_libdir}/cmake/AppStreamQt | |
3ed65cc2 JB |
245 | |
246 | %files qt-static | |
247 | %defattr(644,root,root,755) | |
248 | %{_libdir}/libAppStreamQt.a | |
93b0aff6 JB |
249 | %endif |
250 | ||
10308cd0 JB |
251 | %files -n gettext-its-metainfo |
252 | %defattr(644,root,root,755) | |
10308cd0 JB |
253 | %{_datadir}/gettext/its/metainfo.its |
254 | %{_datadir}/gettext/its/metainfo.loc | |
255 | ||
93b0aff6 JB |
256 | %if %{with vala} |
257 | %files -n vala-appstream | |
258 | %defattr(644,root,root,755) | |
657143e8 | 259 | %{_datadir}/vala/vapi/appstream.deps |
93b0aff6 JB |
260 | %{_datadir}/vala/vapi/appstream.vapi |
261 | %endif |