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