]>
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 |
5b67432b | 35 | BuildRequires: Qt5Test-devel >= 5.0 |
7564e8ae | 36 | BuildRequires: qt5-build >= 5.0 |
112490e9 JB |
37 | BuildRequires: qt5-qmake >= 5.0 |
38 | %endif | |
93b0aff6 JB |
39 | %if %{with apidocs} |
40 | BuildRequires: gtk-doc | |
41 | BuildRequires: publican | |
93b0aff6 | 42 | %endif |
92bc25cb | 43 | Requires: glib2 >= 1:2.46 |
4c88c945 | 44 | Obsoletes: PackageKit-plugin-appstream |
93b0aff6 JB |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
46 | ||
47 | %description | |
48 | AppStream-Core library and tools to access the AppStream component | |
49 | database. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy | |
53 | danych komponentu AppStream. | |
54 | ||
55 | %package devel | |
56 | Summary: Header files for AppStream library | |
57 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStream | |
58 | Group: Development/Libraries | |
59 | Requires: %{name} = %{version}-%{release} | |
92bc25cb | 60 | Requires: glib2-devel >= 1:2.46 |
93b0aff6 JB |
61 | |
62 | %description devel | |
63 | Header files for AppStream library. | |
64 | ||
65 | %description devel -l pl.UTF-8 | |
66 | Pliki nagłówkowe biblioteki AppStream. | |
67 | ||
68 | %package apidocs | |
69 | Summary: AppStream API documentation | |
70 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
71 | Group: Documentation | |
e119917a ER |
72 | %if "%{_rpmversion}" >= "5" |
73 | BuildArch: noarch | |
74 | %endif | |
93b0aff6 JB |
75 | |
76 | %description apidocs | |
77 | API documentation for AppStream library. | |
78 | ||
79 | %description apidocs -l pl.UTF-8 | |
80 | Dokumentacja API biblioteki AppStream. | |
81 | ||
ca5d3962 JB |
82 | %package qt |
83 | Summary: AppstreamQt library | |
84 | Summary(pl.UTF-8): Biblioteka AppstreamQt | |
85 | Group: Libraries | |
112490e9 | 86 | Requires: Qt5Core >= 5.0 |
ca5d3962 JB |
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 | ||
10308cd0 JB |
107 | %package -n gettext-its-metainfo |
108 | Summary: AppStream metainfo ITS data for gettext tools | |
109 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
110 | Group: Development/Tools | |
111 | Requires: gettext-tools >= 0.19 | |
112 | ||
113 | %description -n gettext-its-metainfo | |
114 | AppStream metainfo ITS data for gettext tools. | |
115 | ||
116 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
117 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
118 | ||
93b0aff6 JB |
119 | %package -n vala-appstream |
120 | Summary: Vala API for AppStream library | |
121 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
122 | Group: Development/Libraries | |
123 | Requires: %{name}-devel = %{version}-%{release} | |
124 | Requires: vala | |
36752e97 ER |
125 | %if "%{_rpmversion}" >= "5" |
126 | BuildArch: noarch | |
127 | %endif | |
93b0aff6 JB |
128 | |
129 | %description -n vala-appstream | |
130 | Vala API for AppStream library. | |
131 | ||
132 | %description -n vala-appstream -l pl.UTF-8 | |
133 | API języka Vala do biblioteki AppStream. | |
134 | ||
93b0aff6 JB |
135 | %prep |
136 | %setup -q | |
137 | ||
138 | %build | |
139 | install -d build | |
140 | cd build | |
141 | %cmake .. \ | |
b32aecaf | 142 | %{?with_apt:-DAPT_SUPPORT=ON} \ |
93b0aff6 | 143 | %{?with_apidocs:-DDOCUMENTATION=ON} \ |
c478a3e4 | 144 | %{?with_qt:-DQT=ON} \ |
93b0aff6 JB |
145 | %{?with_vala:-DVAPI=ON} |
146 | ||
031678ad | 147 | %{__make} -j1 |
93b0aff6 JB |
148 | |
149 | %install | |
150 | rm -rf $RPM_BUILD_ROOT | |
151 | ||
152 | %{__make} -C build install \ | |
153 | DESTDIR=$RPM_BUILD_ROOT | |
154 | ||
ca5d3962 JB |
155 | install -d $RPM_BUILD_ROOT%{_docdir} |
156 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
157 | ||
158 | %find_lang appstream | |
159 | ||
93b0aff6 JB |
160 | %clean |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
163 | %post -p /sbin/ldconfig | |
164 | %postun -p /sbin/ldconfig | |
165 | ||
ca5d3962 JB |
166 | %post qt -p /sbin/ldconfig |
167 | %postun qt -p /sbin/ldconfig | |
168 | ||
169 | %files -f appstream.lang | |
93b0aff6 | 170 | %defattr(644,root,root,755) |
4c88c945 | 171 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 172 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 173 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
7564e8ae | 174 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4 |
b32aecaf | 175 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib |
93b0aff6 | 176 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
7564e8ae JB |
177 | %dir %{_datadir}/metainfo |
178 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml | |
b32aecaf JB |
179 | %if %{with apt} |
180 | /etc/apt/apt.conf.d/50appstream | |
181 | %endif | |
c478a3e4 | 182 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
183 | |
184 | %files devel | |
185 | %defattr(644,root,root,755) | |
186 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 187 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
4c88c945 | 188 | %{_includedir}/AppStream |
93b0aff6 JB |
189 | %{_pkgconfigdir}/appstream.pc |
190 | ||
191 | %if %{with apidocs} | |
192 | %files apidocs | |
193 | %defattr(644,root,root,755) | |
112490e9 | 194 | %{_docdir}/appstream |
ca5d3962 JB |
195 | %{_gtkdocdir}/appstream |
196 | %endif | |
197 | ||
198 | %if %{with qt} | |
199 | %files qt | |
200 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
201 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* |
202 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
ca5d3962 JB |
203 | |
204 | %files qt-devel | |
205 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
206 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so |
207 | %{_includedir}/AppStreamQt | |
208 | %{_libdir}/cmake/AppStreamQt | |
93b0aff6 JB |
209 | %endif |
210 | ||
10308cd0 JB |
211 | %files -n gettext-its-metainfo |
212 | %defattr(644,root,root,755) | |
10308cd0 JB |
213 | %{_datadir}/gettext/its/metainfo.its |
214 | %{_datadir}/gettext/its/metainfo.loc | |
215 | ||
93b0aff6 JB |
216 | %if %{with vala} |
217 | %files -n vala-appstream | |
218 | %defattr(644,root,root,755) | |
219 | %{_datadir}/vala/vapi/appstream.vapi | |
220 | %endif |