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