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