]>
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 | 5 | %bcond_without vala # Vala API (VAPI) |
e119917a | 6 | |
93b0aff6 JB |
7 | Summary: AppStream-Core library and tools |
8 | Summary(pl.UTF-8): Biblioteka i narzędzia AppStream-Core | |
9 | Name: AppStream | |
309888e2 | 10 | Version: 0.8.5 |
c478a3e4 | 11 | Release: 1 |
ca5d3962 | 12 | License: LGPL v2.1+ |
93b0aff6 | 13 | Group: Libraries |
ca5d3962 | 14 | Source0: http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz |
309888e2 | 15 | # Source0-md5: 7f67e2d822f83f1cb0fbbeac4aa9e55a |
4c88c945 | 16 | Patch0: %{name}-cmake.patch |
93b0aff6 | 17 | URL: http://www.freedesktop.org/wiki/Distributions/AppStream/Software/ |
ca5d3962 | 18 | BuildRequires: cmake >= 2.8.12 |
6395dea7 | 19 | BuildRequires: gettext-tools |
93b0aff6 JB |
20 | BuildRequires: glib2-devel >= 1:2.36 |
21 | BuildRequires: gobject-introspection-devel | |
22 | BuildRequires: intltool | |
23 | BuildRequires: libstdc++-devel | |
24 | BuildRequires: libxml2-devel >= 2.0 | |
25 | BuildRequires: pkgconfig | |
309888e2 | 26 | BuildRequires: protobuf-devel |
ca5d3962 | 27 | BuildRequires: tar >= 1:1.22 |
93b0aff6 JB |
28 | %{?with_vala:BuildRequires: vala} |
29 | BuildRequires: xapian-core-devel >= 1.2 | |
ca5d3962 | 30 | BuildRequires: xz |
4c88c945 | 31 | BuildRequires: yaml-devel >= 0.1 |
112490e9 | 32 | %if %{with qt} |
112490e9 JB |
33 | BuildRequires: Qt5Core-devel >= 5.0 |
34 | BuildRequires: qt5-qmake >= 5.0 | |
35 | %endif | |
93b0aff6 JB |
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 | |
4c88c945 | 43 | Obsoletes: PackageKit-plugin-appstream |
93b0aff6 JB |
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 | |
e119917a ER |
71 | %if "%{_rpmversion}" >= "5" |
72 | BuildArch: noarch | |
73 | %endif | |
93b0aff6 JB |
74 | |
75 | %description apidocs | |
76 | API documentation for AppStream library. | |
77 | ||
78 | %description apidocs -l pl.UTF-8 | |
79 | Dokumentacja API biblioteki AppStream. | |
80 | ||
ca5d3962 JB |
81 | %package qt |
82 | Summary: AppstreamQt library | |
83 | Summary(pl.UTF-8): Biblioteka AppstreamQt | |
84 | Group: Libraries | |
112490e9 | 85 | Requires: Qt5Core >= 5.0 |
ca5d3962 JB |
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} | |
112490e9 | 99 | Requires: Qt5Core-devel >= 5.0 |
ca5d3962 JB |
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 | ||
93b0aff6 JB |
107 | %package -n vala-appstream |
108 | Summary: Vala API for AppStream library | |
109 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
110 | Group: Development/Libraries | |
111 | Requires: %{name}-devel = %{version}-%{release} | |
112 | Requires: vala | |
113 | ||
114 | %description -n vala-appstream | |
115 | Vala API for AppStream library. | |
116 | ||
117 | %description -n vala-appstream -l pl.UTF-8 | |
118 | API języka Vala do biblioteki AppStream. | |
119 | ||
93b0aff6 JB |
120 | %prep |
121 | %setup -q | |
5aa25d84 | 122 | %patch0 -p1 |
93b0aff6 JB |
123 | |
124 | %build | |
125 | install -d build | |
126 | cd build | |
127 | %cmake .. \ | |
128 | %{?with_apidocs:-DDOCUMENTATION=ON} \ | |
c478a3e4 | 129 | %{?with_qt:-DQT=ON} \ |
93b0aff6 JB |
130 | %{?with_vala:-DVAPI=ON} |
131 | ||
031678ad | 132 | %{__make} -j1 |
93b0aff6 JB |
133 | |
134 | %install | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
137 | %{__make} -C build install \ | |
138 | DESTDIR=$RPM_BUILD_ROOT | |
139 | ||
ca5d3962 JB |
140 | install -d $RPM_BUILD_ROOT%{_docdir} |
141 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
142 | ||
143 | %find_lang appstream | |
144 | ||
93b0aff6 JB |
145 | %clean |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
148 | %post -p /sbin/ldconfig | |
149 | %postun -p /sbin/ldconfig | |
150 | ||
ca5d3962 JB |
151 | %post qt -p /sbin/ldconfig |
152 | %postun qt -p /sbin/ldconfig | |
153 | ||
154 | %files -f appstream.lang | |
93b0aff6 | 155 | %defattr(644,root,root,755) |
4c88c945 | 156 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 157 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 158 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
f1db7849 | 159 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.2 |
112490e9 | 160 | %{_libdir}/girepository-1.0/AppStream-0.8.typelib |
93b0aff6 JB |
161 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
162 | %dir %{_datadir}/app-info | |
163 | %{_datadir}/app-info/categories.xml | |
c478a3e4 | 164 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
165 | |
166 | %files devel | |
167 | %defattr(644,root,root,755) | |
168 | %attr(755,root,root) %{_libdir}/libappstream.so | |
112490e9 | 169 | %{_datadir}/gir-1.0/AppStream-0.8.gir |
4c88c945 | 170 | %{_includedir}/AppStream |
93b0aff6 JB |
171 | %{_pkgconfigdir}/appstream.pc |
172 | ||
173 | %if %{with apidocs} | |
174 | %files apidocs | |
175 | %defattr(644,root,root,755) | |
112490e9 | 176 | %{_docdir}/appstream |
ca5d3962 JB |
177 | %{_gtkdocdir}/appstream |
178 | %endif | |
179 | ||
180 | %if %{with qt} | |
181 | %files qt | |
182 | %defattr(644,root,root,755) | |
183 | %attr(755,root,root) %{_libdir}/libAppstreamQt.so.*.*.* | |
112490e9 | 184 | %attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.1 |
ca5d3962 JB |
185 | |
186 | %files qt-devel | |
187 | %defattr(644,root,root,755) | |
188 | %attr(755,root,root) %{_libdir}/libAppstreamQt.so | |
189 | %{_includedir}/AppstreamQt | |
190 | %{_libdir}/cmake/AppstreamQt | |
93b0aff6 JB |
191 | %endif |
192 | ||
193 | %if %{with vala} | |
194 | %files -n vala-appstream | |
195 | %defattr(644,root,root,755) | |
196 | %{_datadir}/vala/vapi/appstream.vapi | |
197 | %endif |