]>
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 | |
8b8e807c | 11 | Version: 0.12.7 |
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 |
8b8e807c | 16 | # Source0-md5: d83f934b7c75bee0d191779f6cf844d4 |
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 |
8b8e807c | 24 | BuildRequires: libstdc++-devel >= 6:5 |
7564e8ae | 25 | BuildRequires: libstemmer-devel |
93b0aff6 | 26 | BuildRequires: libxml2-devel >= 2.0 |
739d45ae | 27 | BuildRequires: libxslt-progs |
8b8e807c JB |
28 | # with .pc file |
29 | BuildRequires: lmdb-devel >= 0.9.24-1 | |
739d45ae | 30 | BuildRequires: meson >= 0.42 |
8b8e807c | 31 | BuildRequires: ninja >= 1.5 |
93b0aff6 | 32 | BuildRequires: pkgconfig |
739d45ae | 33 | BuildRequires: rpmbuild(macros) >= 1.727 |
ca5d3962 | 34 | BuildRequires: tar >= 1:1.22 |
93b0aff6 | 35 | %{?with_vala:BuildRequires: vala} |
7564e8ae | 36 | BuildRequires: xmlto |
ca5d3962 | 37 | BuildRequires: xz |
4c88c945 | 38 | BuildRequires: yaml-devel >= 0.1 |
112490e9 | 39 | %if %{with qt} |
112490e9 | 40 | BuildRequires: Qt5Core-devel >= 5.0 |
5b67432b | 41 | BuildRequires: Qt5Test-devel >= 5.0 |
7564e8ae | 42 | BuildRequires: qt5-build >= 5.0 |
112490e9 JB |
43 | BuildRequires: qt5-qmake >= 5.0 |
44 | %endif | |
93b0aff6 JB |
45 | %if %{with apidocs} |
46 | BuildRequires: gtk-doc | |
47 | BuildRequires: publican | |
739d45ae | 48 | BuildRequires: python3 |
93b0aff6 | 49 | %endif |
c320e210 | 50 | Requires: glib2 >= 1:2.54 |
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} | |
c320e210 | 67 | Requires: glib2-devel >= 1:2.54 |
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 ER |
91 | %if "%{_rpmversion}" >= "5" |
92 | BuildArch: noarch | |
93 | %endif | |
93b0aff6 JB |
94 | |
95 | %description apidocs | |
96 | API documentation for AppStream library. | |
97 | ||
98 | %description apidocs -l pl.UTF-8 | |
99 | Dokumentacja API biblioteki AppStream. | |
100 | ||
ca5d3962 | 101 | %package qt |
3ed65cc2 JB |
102 | Summary: AppStreamQt library |
103 | Summary(pl.UTF-8): Biblioteka AppStreamQt | |
ca5d3962 | 104 | Group: Libraries |
112490e9 | 105 | Requires: Qt5Core >= 5.0 |
ca5d3962 JB |
106 | |
107 | %description qt | |
3ed65cc2 | 108 | AppStreamQt library. |
ca5d3962 JB |
109 | |
110 | %description qt -l pl.UTF-8 | |
3ed65cc2 | 111 | Biblioteka AppStreamQt. |
ca5d3962 JB |
112 | |
113 | %package qt-devel | |
3ed65cc2 JB |
114 | Summary: Header files for AppStreamQt library |
115 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStreamQt | |
ca5d3962 JB |
116 | Group: Libraries |
117 | Requires: %{name}-qt = %{version}-%{release} | |
112490e9 | 118 | Requires: Qt5Core-devel >= 5.0 |
ca5d3962 JB |
119 | |
120 | %description qt-devel | |
3ed65cc2 | 121 | Header files for AppStreamQt library. |
ca5d3962 JB |
122 | |
123 | %description qt-devel -l pl.UTF-8 | |
3ed65cc2 JB |
124 | Pliki nagłówkowe biblioteki AppStreamQt. |
125 | ||
126 | %package qt-static | |
127 | Summary: Static AppStreamQt library | |
128 | Summary(pl.UTF-8): Statyczna biblioteka AppStreamQt | |
129 | Group: Development/Libraries | |
130 | Requires: %{name}-devel = %{version}-%{release} | |
131 | ||
132 | %description qt-static | |
133 | Static AppStreamQt library. | |
134 | ||
135 | %description qt-static -l pl.UTF-8 | |
136 | Statyczna biblioteka AppStreamQt. | |
ca5d3962 | 137 | |
10308cd0 JB |
138 | %package -n gettext-its-metainfo |
139 | Summary: AppStream metainfo ITS data for gettext tools | |
140 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
141 | Group: Development/Tools | |
142 | Requires: gettext-tools >= 0.19 | |
143 | ||
144 | %description -n gettext-its-metainfo | |
145 | AppStream metainfo ITS data for gettext tools. | |
146 | ||
147 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
148 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
149 | ||
93b0aff6 JB |
150 | %package -n vala-appstream |
151 | Summary: Vala API for AppStream library | |
152 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
153 | Group: Development/Libraries | |
154 | Requires: %{name}-devel = %{version}-%{release} | |
155 | Requires: vala | |
36752e97 ER |
156 | %if "%{_rpmversion}" >= "5" |
157 | BuildArch: noarch | |
158 | %endif | |
93b0aff6 JB |
159 | |
160 | %description -n vala-appstream | |
161 | Vala API for AppStream library. | |
162 | ||
163 | %description -n vala-appstream -l pl.UTF-8 | |
164 | API języka Vala do biblioteki AppStream. | |
165 | ||
93b0aff6 JB |
166 | %prep |
167 | %setup -q | |
168 | ||
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 JB |
207 | %dir %{_datadir}/metainfo |
208 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml | |
b32aecaf JB |
209 | %if %{with apt} |
210 | /etc/apt/apt.conf.d/50appstream | |
211 | %endif | |
c478a3e4 | 212 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
213 | |
214 | %files devel | |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 217 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
739d45ae | 218 | %{_includedir}/appstream |
93b0aff6 JB |
219 | %{_pkgconfigdir}/appstream.pc |
220 | ||
3ed65cc2 JB |
221 | %files static |
222 | %defattr(644,root,root,755) | |
223 | %{_libdir}/libappstream.a | |
224 | ||
93b0aff6 JB |
225 | %if %{with apidocs} |
226 | %files apidocs | |
227 | %defattr(644,root,root,755) | |
112490e9 | 228 | %{_docdir}/appstream |
ca5d3962 JB |
229 | %{_gtkdocdir}/appstream |
230 | %endif | |
231 | ||
232 | %if %{with qt} | |
233 | %files qt | |
234 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
235 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* |
236 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
ca5d3962 JB |
237 | |
238 | %files qt-devel | |
239 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
240 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so |
241 | %{_includedir}/AppStreamQt | |
242 | %{_libdir}/cmake/AppStreamQt | |
3ed65cc2 JB |
243 | |
244 | %files qt-static | |
245 | %defattr(644,root,root,755) | |
246 | %{_libdir}/libAppStreamQt.a | |
93b0aff6 JB |
247 | %endif |
248 | ||
10308cd0 JB |
249 | %files -n gettext-its-metainfo |
250 | %defattr(644,root,root,755) | |
10308cd0 JB |
251 | %{_datadir}/gettext/its/metainfo.its |
252 | %{_datadir}/gettext/its/metainfo.loc | |
253 | ||
93b0aff6 JB |
254 | %if %{with vala} |
255 | %files -n vala-appstream | |
256 | %defattr(644,root,root,755) | |
657143e8 | 257 | %{_datadir}/vala/vapi/appstream.deps |
93b0aff6 JB |
258 | %{_datadir}/vala/vapi/appstream.vapi |
259 | %endif |