]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation build | |
4 | %bcond_with apt # Debian/APT support | |
5 | %bcond_without qt # Qt library (libappstream-qt) | |
6 | %bcond_without vala # Vala API (VAPI) | |
7 | ||
8 | Summary: AppStream-Core library and tools | |
9 | Summary(pl.UTF-8): Biblioteka i narzędzia AppStream-Core | |
10 | Name: AppStream | |
11 | Version: 0.11.8 | |
12 | Release: 2 | |
13 | License: LGPL v2.1+ | |
14 | Group: Libraries | |
15 | Source0: https://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz | |
16 | # Source0-md5: 887436049bd96c47ffccef107452c87d | |
17 | Patch0: cmake.patch | |
18 | URL: https://www.freedesktop.org/wiki/Distributions/AppStream/ | |
19 | BuildRequires: docbook-style-xsl-nons | |
20 | BuildRequires: gettext-tools | |
21 | BuildRequires: glib2-devel >= 1:2.46 | |
22 | BuildRequires: gobject-introspection-devel | |
23 | BuildRequires: itstool | |
24 | BuildRequires: libstdc++-devel >= 6:4.9 | |
25 | BuildRequires: libstemmer-devel | |
26 | BuildRequires: libxml2-devel >= 2.0 | |
27 | BuildRequires: libxslt-progs | |
28 | BuildRequires: meson >= 0.42 | |
29 | BuildRequires: pkgconfig | |
30 | BuildRequires: protobuf-devel | |
31 | BuildRequires: rpmbuild(macros) >= 1.727 | |
32 | BuildRequires: tar >= 1:1.22 | |
33 | %{?with_vala:BuildRequires: vala} | |
34 | BuildRequires: xmlto | |
35 | BuildRequires: xz | |
36 | BuildRequires: yaml-devel >= 0.1 | |
37 | %if %{with qt} | |
38 | BuildRequires: Qt5Core-devel >= 5.0 | |
39 | BuildRequires: Qt5Test-devel >= 5.0 | |
40 | BuildRequires: qt5-build >= 5.0 | |
41 | BuildRequires: qt5-qmake >= 5.0 | |
42 | %endif | |
43 | %if %{with apidocs} | |
44 | BuildRequires: gtk-doc | |
45 | BuildRequires: publican | |
46 | BuildRequires: python3 | |
47 | %endif | |
48 | Requires: glib2 >= 1:2.46 | |
49 | Obsoletes: PackageKit-plugin-appstream | |
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} | |
65 | Requires: glib2-devel >= 1:2.46 | |
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 | ||
73 | %package apidocs | |
74 | Summary: AppStream API documentation | |
75 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
76 | Group: Documentation | |
77 | %if "%{_rpmversion}" >= "5" | |
78 | BuildArch: noarch | |
79 | %endif | |
80 | ||
81 | %description apidocs | |
82 | API documentation for AppStream library. | |
83 | ||
84 | %description apidocs -l pl.UTF-8 | |
85 | Dokumentacja API biblioteki AppStream. | |
86 | ||
87 | %package qt | |
88 | Summary: AppstreamQt library | |
89 | Summary(pl.UTF-8): Biblioteka AppstreamQt | |
90 | Group: Libraries | |
91 | Requires: Qt5Core >= 5.0 | |
92 | ||
93 | %description qt | |
94 | AppstreamQt library. | |
95 | ||
96 | %description qt -l pl.UTF-8 | |
97 | Biblioteka AppstreamQt. | |
98 | ||
99 | %package qt-devel | |
100 | Summary: Header files for AppstreamQt library | |
101 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppstreamQt | |
102 | Group: Libraries | |
103 | Requires: %{name}-qt = %{version}-%{release} | |
104 | Requires: Qt5Core-devel >= 5.0 | |
105 | ||
106 | %description qt-devel | |
107 | Header files for AppstreamQt library. | |
108 | ||
109 | %description qt-devel -l pl.UTF-8 | |
110 | Pliki nagłówkowe biblioteki AppstreamQt. | |
111 | ||
112 | %package -n gettext-its-metainfo | |
113 | Summary: AppStream metainfo ITS data for gettext tools | |
114 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
115 | Group: Development/Tools | |
116 | Requires: gettext-tools >= 0.19 | |
117 | ||
118 | %description -n gettext-its-metainfo | |
119 | AppStream metainfo ITS data for gettext tools. | |
120 | ||
121 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
122 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
123 | ||
124 | %package -n vala-appstream | |
125 | Summary: Vala API for AppStream library | |
126 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
127 | Group: Development/Libraries | |
128 | Requires: %{name}-devel = %{version}-%{release} | |
129 | Requires: vala | |
130 | %if "%{_rpmversion}" >= "5" | |
131 | BuildArch: noarch | |
132 | %endif | |
133 | ||
134 | %description -n vala-appstream | |
135 | Vala API for AppStream library. | |
136 | ||
137 | %description -n vala-appstream -l pl.UTF-8 | |
138 | API języka Vala do biblioteki AppStream. | |
139 | ||
140 | %prep | |
141 | %setup -q | |
142 | %patch0 -p1 | |
143 | ||
144 | %build | |
145 | %meson build \ | |
146 | %{?with_apidocs:-Ddocs=true} \ | |
147 | %{?with_apt:-Dapt-support=true} \ | |
148 | %{?with_qt:-Dqt=true} \ | |
149 | -Dgir=true \ | |
150 | -Dstemming=true \ | |
151 | %{?with_vala:-Dvapi=true} | |
152 | ||
153 | %meson_build -C build | |
154 | ||
155 | %install | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %meson_install -C build | |
159 | ||
160 | install -d $RPM_BUILD_ROOT%{_docdir} | |
161 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
162 | ||
163 | %find_lang appstream | |
164 | ||
165 | %clean | |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | ||
168 | %post -p /sbin/ldconfig | |
169 | %postun -p /sbin/ldconfig | |
170 | ||
171 | %post qt -p /sbin/ldconfig | |
172 | %postun qt -p /sbin/ldconfig | |
173 | ||
174 | %files -f appstream.lang | |
175 | %defattr(644,root,root,755) | |
176 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE | |
177 | %attr(755,root,root) %{_bindir}/appstreamcli | |
178 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* | |
179 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4 | |
180 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib | |
181 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf | |
182 | %dir %{_datadir}/metainfo | |
183 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml | |
184 | %if %{with apt} | |
185 | /etc/apt/apt.conf.d/50appstream | |
186 | %endif | |
187 | %{_mandir}/man1/appstreamcli.1* | |
188 | ||
189 | %files devel | |
190 | %defattr(644,root,root,755) | |
191 | %attr(755,root,root) %{_libdir}/libappstream.so | |
192 | %{_datadir}/gir-1.0/AppStream-1.0.gir | |
193 | %{_includedir}/appstream | |
194 | %{_pkgconfigdir}/appstream.pc | |
195 | ||
196 | %if %{with apidocs} | |
197 | %files apidocs | |
198 | %defattr(644,root,root,755) | |
199 | %{_docdir}/appstream | |
200 | %{_gtkdocdir}/appstream | |
201 | %endif | |
202 | ||
203 | %if %{with qt} | |
204 | %files qt | |
205 | %defattr(644,root,root,755) | |
206 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* | |
207 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
208 | ||
209 | %files qt-devel | |
210 | %defattr(644,root,root,755) | |
211 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so | |
212 | %{_includedir}/AppStreamQt | |
213 | %{_libdir}/cmake/AppStreamQt | |
214 | %endif | |
215 | ||
216 | %files -n gettext-its-metainfo | |
217 | %defattr(644,root,root,755) | |
218 | %{_datadir}/gettext/its/metainfo.its | |
219 | %{_datadir}/gettext/its/metainfo.loc | |
220 | ||
221 | %if %{with vala} | |
222 | %files -n vala-appstream | |
223 | %defattr(644,root,root,755) | |
224 | %{_datadir}/vala/vapi/appstream.deps | |
225 | %{_datadir}/vala/vapi/appstream.vapi | |
226 | %endif |