]>
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 | |
238c0494 | 11 | Version: 0.10.6 |
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 |
238c0494 | 16 | # Source0-md5: eaf1b7b47690987290c14b9629cd229b |
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 |
7564e8ae | 24 | BuildRequires: libstemmer-devel |
93b0aff6 JB |
25 | BuildRequires: libxml2-devel >= 2.0 |
26 | BuildRequires: pkgconfig | |
309888e2 | 27 | BuildRequires: protobuf-devel |
ca5d3962 | 28 | BuildRequires: tar >= 1:1.22 |
93b0aff6 | 29 | %{?with_vala:BuildRequires: vala} |
7564e8ae | 30 | BuildRequires: xmlto |
ca5d3962 | 31 | BuildRequires: xz |
4c88c945 | 32 | BuildRequires: yaml-devel >= 0.1 |
112490e9 | 33 | %if %{with qt} |
112490e9 | 34 | BuildRequires: Qt5Core-devel >= 5.0 |
7564e8ae | 35 | BuildRequires: qt5-build >= 5.0 |
112490e9 JB |
36 | BuildRequires: qt5-qmake >= 5.0 |
37 | %endif | |
93b0aff6 JB |
38 | %if %{with apidocs} |
39 | BuildRequires: gtk-doc | |
40 | BuildRequires: publican | |
93b0aff6 | 41 | %endif |
92bc25cb | 42 | Requires: glib2 >= 1:2.46 |
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} | |
92bc25cb | 59 | Requires: glib2-devel >= 1:2.46 |
93b0aff6 JB |
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 | |
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 | ||
10308cd0 JB |
106 | %package -n gettext-its-metainfo |
107 | Summary: AppStream metainfo ITS data for gettext tools | |
108 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
109 | Group: Development/Tools | |
110 | Requires: gettext-tools >= 0.19 | |
111 | ||
112 | %description -n gettext-its-metainfo | |
113 | AppStream metainfo ITS data for gettext tools. | |
114 | ||
115 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
116 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
117 | ||
93b0aff6 JB |
118 | %package -n vala-appstream |
119 | Summary: Vala API for AppStream library | |
120 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
121 | Group: Development/Libraries | |
122 | Requires: %{name}-devel = %{version}-%{release} | |
123 | Requires: vala | |
36752e97 ER |
124 | %if "%{_rpmversion}" >= "5" |
125 | BuildArch: noarch | |
126 | %endif | |
93b0aff6 JB |
127 | |
128 | %description -n vala-appstream | |
129 | Vala API for AppStream library. | |
130 | ||
131 | %description -n vala-appstream -l pl.UTF-8 | |
132 | API języka Vala do biblioteki AppStream. | |
133 | ||
93b0aff6 JB |
134 | %prep |
135 | %setup -q | |
136 | ||
137 | %build | |
138 | install -d build | |
139 | cd build | |
140 | %cmake .. \ | |
b32aecaf | 141 | %{?with_apt:-DAPT_SUPPORT=ON} \ |
93b0aff6 | 142 | %{?with_apidocs:-DDOCUMENTATION=ON} \ |
c478a3e4 | 143 | %{?with_qt:-DQT=ON} \ |
93b0aff6 JB |
144 | %{?with_vala:-DVAPI=ON} |
145 | ||
031678ad | 146 | %{__make} -j1 |
93b0aff6 JB |
147 | |
148 | %install | |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
151 | %{__make} -C build install \ | |
152 | DESTDIR=$RPM_BUILD_ROOT | |
153 | ||
ca5d3962 JB |
154 | install -d $RPM_BUILD_ROOT%{_docdir} |
155 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
156 | ||
157 | %find_lang appstream | |
158 | ||
93b0aff6 JB |
159 | %clean |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
162 | %post -p /sbin/ldconfig | |
163 | %postun -p /sbin/ldconfig | |
164 | ||
ca5d3962 JB |
165 | %post qt -p /sbin/ldconfig |
166 | %postun qt -p /sbin/ldconfig | |
167 | ||
168 | %files -f appstream.lang | |
93b0aff6 | 169 | %defattr(644,root,root,755) |
4c88c945 | 170 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 171 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 172 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
7564e8ae | 173 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4 |
b32aecaf | 174 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib |
93b0aff6 | 175 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
7564e8ae JB |
176 | %dir %{_datadir}/metainfo |
177 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml | |
b32aecaf JB |
178 | %if %{with apt} |
179 | /etc/apt/apt.conf.d/50appstream | |
180 | %endif | |
c478a3e4 | 181 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
182 | |
183 | %files devel | |
184 | %defattr(644,root,root,755) | |
185 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 186 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
4c88c945 | 187 | %{_includedir}/AppStream |
93b0aff6 JB |
188 | %{_pkgconfigdir}/appstream.pc |
189 | ||
190 | %if %{with apidocs} | |
191 | %files apidocs | |
192 | %defattr(644,root,root,755) | |
112490e9 | 193 | %{_docdir}/appstream |
ca5d3962 JB |
194 | %{_gtkdocdir}/appstream |
195 | %endif | |
196 | ||
197 | %if %{with qt} | |
198 | %files qt | |
199 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
200 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* |
201 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
ca5d3962 JB |
202 | |
203 | %files qt-devel | |
204 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
205 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so |
206 | %{_includedir}/AppStreamQt | |
207 | %{_libdir}/cmake/AppStreamQt | |
93b0aff6 JB |
208 | %endif |
209 | ||
10308cd0 JB |
210 | %files -n gettext-its-metainfo |
211 | %defattr(644,root,root,755) | |
10308cd0 JB |
212 | %{_datadir}/gettext/its/metainfo.its |
213 | %{_datadir}/gettext/its/metainfo.loc | |
214 | ||
93b0aff6 JB |
215 | %if %{with vala} |
216 | %files -n vala-appstream | |
217 | %defattr(644,root,root,755) | |
218 | %{_datadir}/vala/vapi/appstream.vapi | |
219 | %endif |