]>
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 | |
739d45ae | 11 | Version: 0.11.7 |
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 |
739d45ae JB |
16 | # Source0-md5: 9ebc5f5dff51ee6f4d15fdadd782caa7 |
17 | Patch0: %{name}-meson.patch | |
10308cd0 | 18 | URL: https://www.freedesktop.org/wiki/Distributions/AppStream/ |
739d45ae | 19 | BuildRequires: docbook-style-xsl-nons |
6395dea7 | 20 | BuildRequires: gettext-tools |
92bc25cb | 21 | BuildRequires: glib2-devel >= 1:2.46 |
93b0aff6 | 22 | BuildRequires: gobject-introspection-devel |
657143e8 | 23 | BuildRequires: itstool |
739d45ae | 24 | BuildRequires: libstdc++-devel >= 6:4.9 |
7564e8ae | 25 | BuildRequires: libstemmer-devel |
93b0aff6 | 26 | BuildRequires: libxml2-devel >= 2.0 |
739d45ae JB |
27 | BuildRequires: libxslt-progs |
28 | BuildRequires: meson >= 0.42 | |
93b0aff6 | 29 | BuildRequires: pkgconfig |
309888e2 | 30 | BuildRequires: protobuf-devel |
739d45ae | 31 | BuildRequires: rpmbuild(macros) >= 1.727 |
ca5d3962 | 32 | BuildRequires: tar >= 1:1.22 |
93b0aff6 | 33 | %{?with_vala:BuildRequires: vala} |
7564e8ae | 34 | BuildRequires: xmlto |
ca5d3962 | 35 | BuildRequires: xz |
4c88c945 | 36 | BuildRequires: yaml-devel >= 0.1 |
112490e9 | 37 | %if %{with qt} |
112490e9 | 38 | BuildRequires: Qt5Core-devel >= 5.0 |
5b67432b | 39 | BuildRequires: Qt5Test-devel >= 5.0 |
7564e8ae | 40 | BuildRequires: qt5-build >= 5.0 |
112490e9 JB |
41 | BuildRequires: qt5-qmake >= 5.0 |
42 | %endif | |
93b0aff6 JB |
43 | %if %{with apidocs} |
44 | BuildRequires: gtk-doc | |
45 | BuildRequires: publican | |
739d45ae | 46 | BuildRequires: python3 |
93b0aff6 | 47 | %endif |
92bc25cb | 48 | Requires: glib2 >= 1:2.46 |
4c88c945 | 49 | Obsoletes: PackageKit-plugin-appstream |
93b0aff6 JB |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
52 | %description | |
53 | AppStream-Core library and tools to access the AppStream component | |
54 | database. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy | |
58 | danych komponentu AppStream. | |
59 | ||
60 | %package devel | |
61 | Summary: Header files for AppStream library | |
62 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStream | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
92bc25cb | 65 | Requires: glib2-devel >= 1:2.46 |
93b0aff6 JB |
66 | |
67 | %description devel | |
68 | Header files for AppStream library. | |
69 | ||
70 | %description devel -l pl.UTF-8 | |
71 | Pliki nagłówkowe biblioteki AppStream. | |
72 | ||
73 | %package apidocs | |
74 | Summary: AppStream API documentation | |
75 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
76 | Group: Documentation | |
e119917a ER |
77 | %if "%{_rpmversion}" >= "5" |
78 | BuildArch: noarch | |
79 | %endif | |
93b0aff6 JB |
80 | |
81 | %description apidocs | |
82 | API documentation for AppStream library. | |
83 | ||
84 | %description apidocs -l pl.UTF-8 | |
85 | Dokumentacja API biblioteki AppStream. | |
86 | ||
ca5d3962 JB |
87 | %package qt |
88 | Summary: AppstreamQt library | |
89 | Summary(pl.UTF-8): Biblioteka AppstreamQt | |
90 | Group: Libraries | |
112490e9 | 91 | Requires: Qt5Core >= 5.0 |
ca5d3962 JB |
92 | |
93 | %description qt | |
94 | AppstreamQt library. | |
95 | ||
96 | %description qt -l pl.UTF-8 | |
97 | Biblioteka AppstreamQt. | |
98 | ||
99 | %package qt-devel | |
100 | Summary: Header files for AppstreamQt library | |
101 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppstreamQt | |
102 | Group: Libraries | |
103 | Requires: %{name}-qt = %{version}-%{release} | |
112490e9 | 104 | Requires: Qt5Core-devel >= 5.0 |
ca5d3962 JB |
105 | |
106 | %description qt-devel | |
107 | Header files for AppstreamQt library. | |
108 | ||
109 | %description qt-devel -l pl.UTF-8 | |
110 | Pliki nagłówkowe biblioteki AppstreamQt. | |
111 | ||
10308cd0 JB |
112 | %package -n gettext-its-metainfo |
113 | Summary: AppStream metainfo ITS data for gettext tools | |
114 | Summary(pl.UTF-8): Dane ITS AppStream metainfo dla narzędzi gettext | |
115 | Group: Development/Tools | |
116 | Requires: gettext-tools >= 0.19 | |
117 | ||
118 | %description -n gettext-its-metainfo | |
119 | AppStream metainfo ITS data for gettext tools. | |
120 | ||
121 | %description -n gettext-its-metainfo -l pl.UTF-8 | |
122 | Dane ITS AppStream metainfo dla narzędzi gettext. | |
123 | ||
93b0aff6 JB |
124 | %package -n vala-appstream |
125 | Summary: Vala API for AppStream library | |
126 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
127 | Group: Development/Libraries | |
128 | Requires: %{name}-devel = %{version}-%{release} | |
129 | Requires: vala | |
36752e97 ER |
130 | %if "%{_rpmversion}" >= "5" |
131 | BuildArch: noarch | |
132 | %endif | |
93b0aff6 JB |
133 | |
134 | %description -n vala-appstream | |
135 | Vala API for AppStream library. | |
136 | ||
137 | %description -n vala-appstream -l pl.UTF-8 | |
138 | API języka Vala do biblioteki AppStream. | |
139 | ||
93b0aff6 JB |
140 | %prep |
141 | %setup -q | |
739d45ae | 142 | %patch0 -p1 |
93b0aff6 JB |
143 | |
144 | %build | |
739d45ae JB |
145 | %meson build \ |
146 | %{?with_apidocs:-Ddocs=true} \ | |
147 | %{?with_apt:-Dapt-support=true} \ | |
148 | %{?with_qt:-Dqt=true} \ | |
149 | -Dgir=true \ | |
150 | -Dstemming=true \ | |
151 | %{?with_vala:-Dvapi=true} | |
93b0aff6 | 152 | |
739d45ae | 153 | %meson_build -C build |
93b0aff6 JB |
154 | |
155 | %install | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
739d45ae | 158 | %meson_install -C build |
93b0aff6 | 159 | |
ca5d3962 JB |
160 | install -d $RPM_BUILD_ROOT%{_docdir} |
161 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
162 | ||
163 | %find_lang appstream | |
164 | ||
93b0aff6 JB |
165 | %clean |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | ||
168 | %post -p /sbin/ldconfig | |
169 | %postun -p /sbin/ldconfig | |
170 | ||
ca5d3962 JB |
171 | %post qt -p /sbin/ldconfig |
172 | %postun qt -p /sbin/ldconfig | |
173 | ||
174 | %files -f appstream.lang | |
93b0aff6 | 175 | %defattr(644,root,root,755) |
4c88c945 | 176 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 177 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 178 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
7564e8ae | 179 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4 |
b32aecaf | 180 | %{_libdir}/girepository-1.0/AppStream-1.0.typelib |
93b0aff6 | 181 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
7564e8ae JB |
182 | %dir %{_datadir}/metainfo |
183 | %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml | |
b32aecaf JB |
184 | %if %{with apt} |
185 | /etc/apt/apt.conf.d/50appstream | |
186 | %endif | |
c478a3e4 | 187 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
188 | |
189 | %files devel | |
190 | %defattr(644,root,root,755) | |
191 | %attr(755,root,root) %{_libdir}/libappstream.so | |
b32aecaf | 192 | %{_datadir}/gir-1.0/AppStream-1.0.gir |
739d45ae | 193 | %{_includedir}/appstream |
93b0aff6 JB |
194 | %{_pkgconfigdir}/appstream.pc |
195 | ||
196 | %if %{with apidocs} | |
197 | %files apidocs | |
198 | %defattr(644,root,root,755) | |
112490e9 | 199 | %{_docdir}/appstream |
ca5d3962 JB |
200 | %{_gtkdocdir}/appstream |
201 | %endif | |
202 | ||
203 | %if %{with qt} | |
204 | %files qt | |
205 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
206 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.* |
207 | %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2 | |
ca5d3962 JB |
208 | |
209 | %files qt-devel | |
210 | %defattr(644,root,root,755) | |
3b6d4ef4 JB |
211 | %attr(755,root,root) %{_libdir}/libAppStreamQt.so |
212 | %{_includedir}/AppStreamQt | |
213 | %{_libdir}/cmake/AppStreamQt | |
93b0aff6 JB |
214 | %endif |
215 | ||
10308cd0 JB |
216 | %files -n gettext-its-metainfo |
217 | %defattr(644,root,root,755) | |
10308cd0 JB |
218 | %{_datadir}/gettext/its/metainfo.its |
219 | %{_datadir}/gettext/its/metainfo.loc | |
220 | ||
93b0aff6 JB |
221 | %if %{with vala} |
222 | %files -n vala-appstream | |
223 | %defattr(644,root,root,755) | |
657143e8 | 224 | %{_datadir}/vala/vapi/appstream.deps |
93b0aff6 JB |
225 | %{_datadir}/vala/vapi/appstream.vapi |
226 | %endif |