]>
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.9.1 | |
12 | Release: 1 | |
13 | License: LGPL v2.1+ | |
14 | Group: Libraries | |
15 | Source0: https://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz | |
16 | # Source0-md5: df6f4aaa865f11f2e186fd2fa8ec142d | |
17 | URL: https://www.freedesktop.org/wiki/Distributions/AppStream/ | |
18 | BuildRequires: cmake >= 3.2.0 | |
19 | BuildRequires: gettext-tools | |
20 | BuildRequires: glib2-devel >= 1:2.36 | |
21 | BuildRequires: gobject-introspection-devel | |
22 | BuildRequires: intltool | |
23 | BuildRequires: libstdc++-devel >= 6:4.7 | |
24 | BuildRequires: libxml2-devel >= 2.0 | |
25 | BuildRequires: pkgconfig | |
26 | BuildRequires: protobuf-devel | |
27 | BuildRequires: tar >= 1:1.22 | |
28 | %{?with_vala:BuildRequires: vala} | |
29 | BuildRequires: xapian-core-devel >= 1.2 | |
30 | BuildRequires: xz | |
31 | BuildRequires: yaml-devel >= 0.1 | |
32 | %if %{with qt} | |
33 | BuildRequires: Qt5Core-devel >= 5.0 | |
34 | BuildRequires: qt5-qmake >= 5.0 | |
35 | %endif | |
36 | %if %{with apidocs} | |
37 | BuildRequires: gtk-doc | |
38 | BuildRequires: publican | |
39 | BuildRequires: xmlto | |
40 | %endif | |
41 | Requires: glib2 >= 1:2.36 | |
42 | Requires: xapian-core-libs >= 1.2 | |
43 | Obsoletes: PackageKit-plugin-appstream | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
47 | AppStream-Core library and tools to access the AppStream component | |
48 | database. | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy | |
52 | danych komponentu AppStream. | |
53 | ||
54 | %package devel | |
55 | Summary: Header files for AppStream library | |
56 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStream | |
57 | Group: Development/Libraries | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | Requires: glib2-devel >= 1:2.36 | |
60 | ||
61 | %description devel | |
62 | Header files for AppStream library. | |
63 | ||
64 | %description devel -l pl.UTF-8 | |
65 | Pliki nagłówkowe biblioteki AppStream. | |
66 | ||
67 | %package apidocs | |
68 | Summary: AppStream API documentation | |
69 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
70 | Group: Documentation | |
71 | %if "%{_rpmversion}" >= "5" | |
72 | BuildArch: noarch | |
73 | %endif | |
74 | ||
75 | %description apidocs | |
76 | API documentation for AppStream library. | |
77 | ||
78 | %description apidocs -l pl.UTF-8 | |
79 | Dokumentacja API biblioteki AppStream. | |
80 | ||
81 | %package qt | |
82 | Summary: AppstreamQt library | |
83 | Summary(pl.UTF-8): Biblioteka AppstreamQt | |
84 | Group: Libraries | |
85 | Requires: Qt5Core >= 5.0 | |
86 | Requires: xapian-core-libs >= 1.2 | |
87 | ||
88 | %description qt | |
89 | AppstreamQt library. | |
90 | ||
91 | %description qt -l pl.UTF-8 | |
92 | Biblioteka AppstreamQt. | |
93 | ||
94 | %package qt-devel | |
95 | Summary: Header files for AppstreamQt library | |
96 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppstreamQt | |
97 | Group: Libraries | |
98 | Requires: %{name}-qt = %{version}-%{release} | |
99 | Requires: Qt5Core-devel >= 5.0 | |
100 | ||
101 | %description qt-devel | |
102 | Header files for AppstreamQt library. | |
103 | ||
104 | %description qt-devel -l pl.UTF-8 | |
105 | Pliki nagłówkowe biblioteki AppstreamQt. | |
106 | ||
107 | %package -n gettext-its-metainfo | |
108 | Summary: AppStream metainfo ITS data for gettext tools | |
109 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
110 | Group: Development/Tools | |
111 | Requires: gettext-tools >= 0.19 | |
112 | ||
113 | %description -n gettext-its-metainfo | |
114 | AppStream metainfo ITS data for gettext tools. | |
115 | ||
116 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
117 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
118 | ||
119 | %package -n vala-appstream | |
120 | Summary: Vala API for AppStream library | |
121 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
122 | Group: Development/Libraries | |
123 | Requires: %{name}-devel = %{version}-%{release} | |
124 | Requires: vala | |
125 | ||
126 | %description -n vala-appstream | |
127 | Vala API for AppStream library. | |
128 | ||
129 | %description -n vala-appstream -l pl.UTF-8 | |
130 | API języka Vala do biblioteki AppStream. | |
131 | ||
132 | %prep | |
133 | %setup -q | |
134 | ||
135 | %build | |
136 | install -d build | |
137 | cd build | |
138 | %cmake .. \ | |
139 | %{?with_apt:-DAPT_SUPPORT=ON} \ | |
140 | %{?with_apidocs:-DDOCUMENTATION=ON} \ | |
141 | %{?with_qt:-DQT=ON} \ | |
142 | %{?with_vala:-DVAPI=ON} | |
143 | ||
144 | %{__make} -j1 | |
145 | ||
146 | %install | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %{__make} -C build install \ | |
150 | DESTDIR=$RPM_BUILD_ROOT | |
151 | ||
152 | install -d $RPM_BUILD_ROOT%{_docdir} | |
153 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
154 | ||
155 | %find_lang appstream | |
156 | ||
157 | %clean | |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
160 | %post -p /sbin/ldconfig | |
161 | %postun -p /sbin/ldconfig | |
162 | ||
163 | %post qt -p /sbin/ldconfig | |
164 | %postun qt -p /sbin/ldconfig | |
165 | ||
166 | %files -f appstream.lang | |
167 | %defattr(644,root,root,755) | |
168 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE | |
169 | %attr(755,root,root) %{_bindir}/appstreamcli | |
170 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* | |
171 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.3 | |
172 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib | |
173 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf | |
174 | %dir %{_datadir}/app-info | |
175 | %{_datadir}/app-info/categories.xml | |
176 | %if %{with apt} | |
177 | /etc/apt/apt.conf.d/50appstream | |
178 | %endif | |
179 | %{_mandir}/man1/appstreamcli.1* | |
180 | ||
181 | %files devel | |
182 | %defattr(644,root,root,755) | |
183 | %attr(755,root,root) %{_libdir}/libappstream.so | |
184 | %{_datadir}/gir-1.0/AppStream-1.0.gir | |
185 | %{_includedir}/AppStream | |
186 | %{_pkgconfigdir}/appstream.pc | |
187 | ||
188 | %if %{with apidocs} | |
189 | %files apidocs | |
190 | %defattr(644,root,root,755) | |
191 | %{_docdir}/appstream | |
192 | %{_gtkdocdir}/appstream | |
193 | %endif | |
194 | ||
195 | %if %{with qt} | |
196 | %files qt | |
197 | %defattr(644,root,root,755) | |
198 | %attr(755,root,root) %{_libdir}/libAppstreamQt.so.*.*.* | |
199 | %attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.1 | |
200 | ||
201 | %files qt-devel | |
202 | %defattr(644,root,root,755) | |
203 | %attr(755,root,root) %{_libdir}/libAppstreamQt.so | |
204 | %{_includedir}/AppstreamQt | |
205 | %{_libdir}/cmake/AppstreamQt | |
206 | %endif | |
207 | ||
208 | %files -n gettext-its-metainfo | |
209 | %defattr(644,root,root,755) | |
210 | %dir %{_datadir}/gettext/its | |
211 | %{_datadir}/gettext/its/metainfo.its | |
212 | %{_datadir}/gettext/its/metainfo.loc | |
213 | ||
214 | %if %{with vala} | |
215 | %files -n vala-appstream | |
216 | %defattr(644,root,root,755) | |
217 | %{_datadir}/vala/vapi/appstream.vapi | |
218 | %endif |