]>
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 | |
c320e210 | 11 | Version: 0.12.6 |
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 |
c320e210 | 16 | # Source0-md5: ffd1555953828656971424ca5329f352 |
10308cd0 | 17 | URL: https://www.freedesktop.org/wiki/Distributions/AppStream/ |
739d45ae | 18 | BuildRequires: docbook-style-xsl-nons |
6395dea7 | 19 | BuildRequires: gettext-tools |
c320e210 | 20 | BuildRequires: glib2-devel >= 1:2.54 |
3ed65cc2 JB |
21 | BuildRequires: gobject-introspection-devel >= 1.54 |
22 | BuildRequires: gperf | |
657143e8 | 23 | BuildRequires: itstool |
739d45ae | 24 | BuildRequires: libstdc++-devel >= 6:4.9 |
7564e8ae | 25 | BuildRequires: libstemmer-devel |
93b0aff6 | 26 | BuildRequires: libxml2-devel >= 2.0 |
739d45ae JB |
27 | BuildRequires: libxslt-progs |
28 | BuildRequires: meson >= 0.42 | |
3ed65cc2 | 29 | BuildRequires: ninja |
93b0aff6 | 30 | BuildRequires: pkgconfig |
739d45ae | 31 | BuildRequires: rpmbuild(macros) >= 1.727 |
ca5d3962 | 32 | BuildRequires: tar >= 1:1.22 |
93b0aff6 | 33 | %{?with_vala:BuildRequires: vala} |
7564e8ae | 34 | BuildRequires: xmlto |
ca5d3962 | 35 | BuildRequires: xz |
4c88c945 | 36 | BuildRequires: yaml-devel >= 0.1 |
112490e9 | 37 | %if %{with qt} |
112490e9 | 38 | BuildRequires: Qt5Core-devel >= 5.0 |
5b67432b | 39 | BuildRequires: Qt5Test-devel >= 5.0 |
7564e8ae | 40 | BuildRequires: qt5-build >= 5.0 |
112490e9 JB |
41 | BuildRequires: qt5-qmake >= 5.0 |
42 | %endif | |
93b0aff6 JB |
43 | %if %{with apidocs} |
44 | BuildRequires: gtk-doc | |
45 | BuildRequires: publican | |
739d45ae | 46 | BuildRequires: python3 |
93b0aff6 | 47 | %endif |
c320e210 | 48 | Requires: glib2 >= 1:2.54 |
4c88c945 | 49 | Obsoletes: PackageKit-plugin-appstream |
93b0aff6 JB |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
52 | %description | |
53 | AppStream-Core library and tools to access the AppStream component | |
54 | database. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy | |
58 | danych komponentu AppStream. | |
59 | ||
60 | %package devel | |
61 | Summary: Header files for AppStream library | |
62 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStream | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
c320e210 | 65 | Requires: glib2-devel >= 1:2.54 |
93b0aff6 JB |
66 | |
67 | %description devel | |
68 | Header files for AppStream library. | |
69 | ||
70 | %description devel -l pl.UTF-8 | |
71 | Pliki nagłówkowe biblioteki AppStream. | |
72 | ||
3ed65cc2 JB |
73 | %package static |
74 | Summary: Static AppStream library | |
75 | Summary(pl.UTF-8): Statyczna biblioteka AppStream | |
76 | Group: Development/Libraries | |
77 | Requires: %{name}-devel = %{version}-%{release} | |
78 | ||
79 | %description static | |
80 | Static AppStream library. | |
81 | ||
82 | %description static -l pl.UTF-8 | |
83 | Statyczna biblioteka AppStream. | |
84 | ||
93b0aff6 JB |
85 | %package apidocs |
86 | Summary: AppStream API documentation | |
87 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
88 | Group: Documentation | |
e119917a ER |
89 | %if "%{_rpmversion}" >= "5" |
90 | BuildArch: noarch | |
91 | %endif | |
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 ER |
154 | %if "%{_rpmversion}" >= "5" |
155 | BuildArch: noarch | |
156 | %endif | |
93b0aff6 JB |
157 | |
158 | %description -n vala-appstream | |
159 | Vala API for AppStream library. | |
160 | ||
161 | %description -n vala-appstream -l pl.UTF-8 | |
162 | API języka Vala do biblioteki AppStream. | |
163 | ||
93b0aff6 JB |
164 | %prep |
165 | %setup -q | |
166 | ||
167 | %build | |
739d45ae JB |
168 | %meson build \ |
169 | %{?with_apidocs:-Ddocs=true} \ | |
170 | %{?with_apt:-Dapt-support=true} \ | |
171 | %{?with_qt:-Dqt=true} \ | |
172 | -Dgir=true \ | |
173 | -Dstemming=true \ | |
174 | %{?with_vala:-Dvapi=true} | |
93b0aff6 | 175 | |
739d45ae | 176 | %meson_build -C build |
93b0aff6 JB |
177 | |
178 | %install | |
179 | rm -rf $RPM_BUILD_ROOT | |
180 | ||
739d45ae | 181 | %meson_install -C build |
93b0aff6 | 182 | |
ca5d3962 JB |
183 | install -d $RPM_BUILD_ROOT%{_docdir} |
184 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
185 | ||
186 | %find_lang appstream | |
187 | ||
93b0aff6 JB |
188 | %clean |
189 | rm -rf $RPM_BUILD_ROOT | |
190 | ||
191 | %post -p /sbin/ldconfig | |
192 | %postun -p /sbin/ldconfig | |
193 | ||
ca5d3962 JB |
194 | %post qt -p /sbin/ldconfig |
195 | %postun qt -p /sbin/ldconfig | |
196 | ||
197 | %files -f appstream.lang | |
93b0aff6 | 198 | %defattr(644,root,root,755) |
4c88c945 | 199 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 200 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 201 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
7564e8ae | 202 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4 |
b32aecaf | 203 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib |
93b0aff6 | 204 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
7564e8ae JB |
205 | %dir %{_datadir}/metainfo |
206 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml | |
b32aecaf JB |
207 | %if %{with apt} |
208 | /etc/apt/apt.conf.d/50appstream | |
209 | %endif | |
c478a3e4 | 210 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
211 | |
212 | %files devel | |
213 | %defattr(644,root,root,755) | |
214 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 215 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
739d45ae | 216 | %{_includedir}/appstream |
93b0aff6 JB |
217 | %{_pkgconfigdir}/appstream.pc |
218 | ||
3ed65cc2 JB |
219 | %files static |
220 | %defattr(644,root,root,755) | |
221 | %{_libdir}/libappstream.a | |
222 | ||
93b0aff6 JB |
223 | %if %{with apidocs} |
224 | %files apidocs | |
225 | %defattr(644,root,root,755) | |
112490e9 | 226 | %{_docdir}/appstream |
ca5d3962 JB |
227 | %{_gtkdocdir}/appstream |
228 | %endif | |
229 | ||
230 | %if %{with qt} | |
231 | %files qt | |
232 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
233 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* |
234 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
ca5d3962 JB |
235 | |
236 | %files qt-devel | |
237 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
238 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so |
239 | %{_includedir}/AppStreamQt | |
240 | %{_libdir}/cmake/AppStreamQt | |
3ed65cc2 JB |
241 | |
242 | %files qt-static | |
243 | %defattr(644,root,root,755) | |
244 | %{_libdir}/libAppStreamQt.a | |
93b0aff6 JB |
245 | %endif |
246 | ||
10308cd0 JB |
247 | %files -n gettext-its-metainfo |
248 | %defattr(644,root,root,755) | |
10308cd0 JB |
249 | %{_datadir}/gettext/its/metainfo.its |
250 | %{_datadir}/gettext/its/metainfo.loc | |
251 | ||
93b0aff6 JB |
252 | %if %{with vala} |
253 | %files -n vala-appstream | |
254 | %defattr(644,root,root,755) | |
657143e8 | 255 | %{_datadir}/vala/vapi/appstream.deps |
93b0aff6 JB |
256 | %{_datadir}/vala/vapi/appstream.vapi |
257 | %endif |