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