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