]>
Commit | Line | Data |
---|---|---|
93b0aff6 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation build | |
b32aecaf | 4 | %bcond_with apt # Debian/APT support |
ca5d3962 | 5 | %bcond_without qt # Qt library (libappstream-qt) |
93b0aff6 | 6 | %bcond_without vala # Vala API (VAPI) |
e119917a | 7 | |
93b0aff6 JB |
8 | Summary: AppStream-Core library and tools |
9 | Summary(pl.UTF-8): Biblioteka i narzędzia AppStream-Core | |
10 | Name: AppStream | |
cc616716 | 11 | Version: 0.9.8 |
47dec53e | 12 | Release: 1 |
ca5d3962 | 13 | License: LGPL v2.1+ |
93b0aff6 | 14 | Group: Libraries |
10308cd0 | 15 | Source0: https://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz |
cc616716 | 16 | # Source0-md5: ef59eace0af140a03e0e5807d6057b1f |
10308cd0 | 17 | URL: https://www.freedesktop.org/wiki/Distributions/AppStream/ |
9c78b344 | 18 | BuildRequires: cmake >= 3.2.0 |
6395dea7 | 19 | BuildRequires: gettext-tools |
92bc25cb | 20 | BuildRequires: glib2-devel >= 1:2.46 |
93b0aff6 JB |
21 | BuildRequires: gobject-introspection-devel |
22 | BuildRequires: intltool | |
b32aecaf | 23 | BuildRequires: libstdc++-devel >= 6:4.7 |
93b0aff6 JB |
24 | BuildRequires: libxml2-devel >= 2.0 |
25 | BuildRequires: pkgconfig | |
309888e2 | 26 | BuildRequires: protobuf-devel |
ca5d3962 | 27 | BuildRequires: tar >= 1:1.22 |
93b0aff6 | 28 | %{?with_vala:BuildRequires: vala} |
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 | |
92bc25cb | 40 | Requires: glib2 >= 1:2.46 |
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} | |
92bc25cb | 57 | Requires: glib2-devel >= 1:2.46 |
93b0aff6 JB |
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 | |
e119917a ER |
69 | %if "%{_rpmversion}" >= "5" |
70 | BuildArch: noarch | |
71 | %endif | |
93b0aff6 JB |
72 | |
73 | %description apidocs | |
74 | API documentation for AppStream library. | |
75 | ||
76 | %description apidocs -l pl.UTF-8 | |
77 | Dokumentacja API biblioteki AppStream. | |
78 | ||
ca5d3962 JB |
79 | %package qt |
80 | Summary: AppstreamQt library | |
81 | Summary(pl.UTF-8): Biblioteka AppstreamQt | |
82 | Group: Libraries | |
112490e9 | 83 | Requires: Qt5Core >= 5.0 |
ca5d3962 JB |
84 | |
85 | %description qt | |
86 | AppstreamQt library. | |
87 | ||
88 | %description qt -l pl.UTF-8 | |
89 | Biblioteka AppstreamQt. | |
90 | ||
91 | %package qt-devel | |
92 | Summary: Header files for AppstreamQt library | |
93 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppstreamQt | |
94 | Group: Libraries | |
95 | Requires: %{name}-qt = %{version}-%{release} | |
112490e9 | 96 | Requires: Qt5Core-devel >= 5.0 |
ca5d3962 JB |
97 | |
98 | %description qt-devel | |
99 | Header files for AppstreamQt library. | |
100 | ||
101 | %description qt-devel -l pl.UTF-8 | |
102 | Pliki nagłówkowe biblioteki AppstreamQt. | |
103 | ||
10308cd0 JB |
104 | %package -n gettext-its-metainfo |
105 | Summary: AppStream metainfo ITS data for gettext tools | |
106 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
107 | Group: Development/Tools | |
108 | Requires: gettext-tools >= 0.19 | |
109 | ||
110 | %description -n gettext-its-metainfo | |
111 | AppStream metainfo ITS data for gettext tools. | |
112 | ||
113 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
114 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
115 | ||
93b0aff6 JB |
116 | %package -n vala-appstream |
117 | Summary: Vala API for AppStream library | |
118 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
119 | Group: Development/Libraries | |
120 | Requires: %{name}-devel = %{version}-%{release} | |
121 | Requires: vala | |
36752e97 ER |
122 | %if "%{_rpmversion}" >= "5" |
123 | BuildArch: noarch | |
124 | %endif | |
93b0aff6 JB |
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 | ||
93b0aff6 JB |
132 | %prep |
133 | %setup -q | |
134 | ||
135 | %build | |
136 | install -d build | |
137 | cd build | |
138 | %cmake .. \ | |
b32aecaf | 139 | %{?with_apt:-DAPT_SUPPORT=ON} \ |
93b0aff6 | 140 | %{?with_apidocs:-DDOCUMENTATION=ON} \ |
c478a3e4 | 141 | %{?with_qt:-DQT=ON} \ |
93b0aff6 JB |
142 | %{?with_vala:-DVAPI=ON} |
143 | ||
031678ad | 144 | %{__make} -j1 |
93b0aff6 JB |
145 | |
146 | %install | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %{__make} -C build install \ | |
150 | DESTDIR=$RPM_BUILD_ROOT | |
151 | ||
ca5d3962 JB |
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 | ||
93b0aff6 JB |
157 | %clean |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
160 | %post -p /sbin/ldconfig | |
161 | %postun -p /sbin/ldconfig | |
162 | ||
ca5d3962 JB |
163 | %post qt -p /sbin/ldconfig |
164 | %postun qt -p /sbin/ldconfig | |
165 | ||
166 | %files -f appstream.lang | |
93b0aff6 | 167 | %defattr(644,root,root,755) |
4c88c945 | 168 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 169 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 170 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
b32aecaf JB |
171 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.3 |
172 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib | |
93b0aff6 JB |
173 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
174 | %dir %{_datadir}/app-info | |
175 | %{_datadir}/app-info/categories.xml | |
b32aecaf JB |
176 | %if %{with apt} |
177 | /etc/apt/apt.conf.d/50appstream | |
178 | %endif | |
c478a3e4 | 179 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
180 | |
181 | %files devel | |
182 | %defattr(644,root,root,755) | |
183 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 184 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
4c88c945 | 185 | %{_includedir}/AppStream |
93b0aff6 JB |
186 | %{_pkgconfigdir}/appstream.pc |
187 | ||
188 | %if %{with apidocs} | |
189 | %files apidocs | |
190 | %defattr(644,root,root,755) | |
112490e9 | 191 | %{_docdir}/appstream |
ca5d3962 JB |
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.*.*.* | |
112490e9 | 199 | %attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.1 |
ca5d3962 JB |
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 | |
93b0aff6 JB |
206 | %endif |
207 | ||
10308cd0 JB |
208 | %files -n gettext-its-metainfo |
209 | %defattr(644,root,root,755) | |
10308cd0 JB |
210 | %{_datadir}/gettext/its/metainfo.its |
211 | %{_datadir}/gettext/its/metainfo.loc | |
212 | ||
93b0aff6 JB |
213 | %if %{with vala} |
214 | %files -n vala-appstream | |
215 | %defattr(644,root,root,755) | |
216 | %{_datadir}/vala/vapi/appstream.vapi | |
217 | %endif |