- updated to 0.12.2
[packages/AppStream.git] / AppStream.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation build
4 %bcond_with     apt             # Debian/APT support
5 %bcond_without  qt              # Qt library (libappstream-qt)
6 %bcond_without  vala            # Vala API (VAPI)
7
8 Summary:        AppStream-Core library and tools
9 Summary(pl.UTF-8):      Biblioteka i narzędzia AppStream-Core
10 Name:           AppStream
11 Version:        0.12.2
12 Release:        1
13 License:        LGPL v2.1+
14 Group:          Libraries
15 Source0:        https://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz
16 # Source0-md5:  9117728a7287c14eeac20fd9b4e6c791
17 URL:            https://www.freedesktop.org/wiki/Distributions/AppStream/
18 BuildRequires:  docbook-style-xsl-nons
19 BuildRequires:  gettext-tools
20 BuildRequires:  glib2-devel >= 1:2.46
21 BuildRequires:  gobject-introspection-devel >= 1.54
22 BuildRequires:  gperf
23 BuildRequires:  itstool
24 BuildRequires:  libstdc++-devel >= 6:4.9
25 BuildRequires:  libstemmer-devel
26 BuildRequires:  libxml2-devel >= 2.0
27 BuildRequires:  libxslt-progs
28 BuildRequires:  meson >= 0.42
29 BuildRequires:  ninja
30 BuildRequires:  pkgconfig
31 BuildRequires:  rpmbuild(macros) >= 1.727
32 BuildRequires:  tar >= 1:1.22
33 %{?with_vala:BuildRequires:     vala}
34 BuildRequires:  xmlto
35 BuildRequires:  xz
36 BuildRequires:  yaml-devel >= 0.1
37 %if %{with qt}
38 BuildRequires:  Qt5Core-devel >= 5.0
39 BuildRequires:  Qt5Test-devel >= 5.0
40 BuildRequires:  qt5-build >= 5.0
41 BuildRequires:  qt5-qmake >= 5.0
42 %endif
43 %if %{with apidocs}
44 BuildRequires:  gtk-doc
45 BuildRequires:  publican
46 BuildRequires:  python3
47 %endif
48 Requires:       glib2 >= 1:2.46
49 Obsoletes:      PackageKit-plugin-appstream
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}
65 Requires:       glib2-devel >= 1:2.46
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 static
74 Summary:        Static AppStream library
75 Summary(pl.UTF-8):      Statyczna biblioteka AppStream
76 Group:          Development/Libraries
77 Requires:       %{name}-devel = %{version}-%{release}
78
79 %description static
80 Static AppStream library.
81
82 %description static -l pl.UTF-8
83 Statyczna biblioteka AppStream.
84
85 %package apidocs
86 Summary:        AppStream API documentation
87 Summary(pl.UTF-8):      Dokumentacja API biblioteki AppStream
88 Group:          Documentation
89 %if "%{_rpmversion}" >= "5"
90 BuildArch:      noarch
91 %endif
92
93 %description apidocs
94 API documentation for AppStream library.
95
96 %description apidocs -l pl.UTF-8
97 Dokumentacja API biblioteki AppStream.
98
99 %package qt
100 Summary:        AppStreamQt library
101 Summary(pl.UTF-8):      Biblioteka AppStreamQt
102 Group:          Libraries
103 Requires:       Qt5Core >= 5.0
104
105 %description qt
106 AppStreamQt library.
107
108 %description qt -l pl.UTF-8
109 Biblioteka AppStreamQt.
110
111 %package qt-devel
112 Summary:        Header files for AppStreamQt library
113 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki AppStreamQt
114 Group:          Libraries
115 Requires:       %{name}-qt = %{version}-%{release}
116 Requires:       Qt5Core-devel >= 5.0
117
118 %description qt-devel
119 Header files for AppStreamQt library.
120
121 %description qt-devel -l pl.UTF-8
122 Pliki nagłówkowe biblioteki AppStreamQt.
123
124 %package qt-static
125 Summary:        Static AppStreamQt library
126 Summary(pl.UTF-8):      Statyczna biblioteka AppStreamQt
127 Group:          Development/Libraries
128 Requires:       %{name}-devel = %{version}-%{release}
129
130 %description qt-static
131 Static AppStreamQt library.
132
133 %description qt-static -l pl.UTF-8
134 Statyczna biblioteka AppStreamQt.
135
136 %package -n gettext-its-metainfo
137 Summary:        AppStream metainfo ITS data for gettext tools
138 Summary(pl.UTF-8):      Dane ITS AppStream metainfo dla narzędzi gettext
139 Group:          Development/Tools
140 Requires:       gettext-tools >= 0.19
141
142 %description -n gettext-its-metainfo
143 AppStream metainfo ITS data for gettext tools.
144
145 %description -n gettext-its-metainfo -l pl.UTF-8
146 Dane ITS AppStream metainfo dla narzędzi gettext.
147
148 %package -n vala-appstream
149 Summary:        Vala API for AppStream library
150 Summary(pl.UTF-8):      API języka Vala do biblioteki AppStream
151 Group:          Development/Libraries
152 Requires:       %{name}-devel = %{version}-%{release}
153 Requires:       vala
154 %if "%{_rpmversion}" >= "5"
155 BuildArch:      noarch
156 %endif
157
158 %description -n vala-appstream
159 Vala API for AppStream library.
160
161 %description -n vala-appstream -l pl.UTF-8
162 API języka Vala do biblioteki AppStream.
163
164 %prep
165 %setup -q
166
167 %build
168 %meson build \
169         %{?with_apidocs:-Ddocs=true} \
170         %{?with_apt:-Dapt-support=true} \
171         %{?with_qt:-Dqt=true} \
172         -Dgir=true \
173         -Dstemming=true \
174         %{?with_vala:-Dvapi=true}
175
176 %meson_build -C build
177
178 %install
179 rm -rf $RPM_BUILD_ROOT
180
181 %meson_install -C build
182
183 install -d $RPM_BUILD_ROOT%{_docdir}
184 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir}
185
186 %find_lang appstream
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %post   -p /sbin/ldconfig
192 %postun -p /sbin/ldconfig
193
194 %post   qt -p /sbin/ldconfig
195 %postun qt -p /sbin/ldconfig
196
197 %files -f appstream.lang
198 %defattr(644,root,root,755)
199 %doc AUTHORS MAINTAINERS NEWS README.md RELEASE
200 %attr(755,root,root) %{_bindir}/appstreamcli
201 %attr(755,root,root) %{_libdir}/libappstream.so.*.*.*
202 %attr(755,root,root) %ghost %{_libdir}/libappstream.so.4
203 %{_libdir}/girepository-1.0/AppStream-1.0.typelib
204 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf
205 %dir %{_datadir}/metainfo
206 %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml
207 %if %{with apt}
208 /etc/apt/apt.conf.d/50appstream
209 %endif
210 %{_mandir}/man1/appstreamcli.1*
211
212 %files devel
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_libdir}/libappstream.so
215 %{_datadir}/gir-1.0/AppStream-1.0.gir
216 %{_includedir}/appstream
217 %{_pkgconfigdir}/appstream.pc
218
219 %files static
220 %defattr(644,root,root,755)
221 %{_libdir}/libappstream.a
222
223 %if %{with apidocs}
224 %files apidocs
225 %defattr(644,root,root,755)
226 %{_docdir}/appstream
227 %{_gtkdocdir}/appstream
228 %endif
229
230 %if %{with qt}
231 %files qt
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_libdir}/libAppStreamQt.so.*.*.*
234 %attr(755,root,root) %ghost %{_libdir}/libAppStreamQt.so.2
235
236 %files qt-devel
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/libAppStreamQt.so
239 %{_includedir}/AppStreamQt
240 %{_libdir}/cmake/AppStreamQt
241
242 %files qt-static
243 %defattr(644,root,root,755)
244 %{_libdir}/libAppStreamQt.a
245 %endif
246
247 %files -n gettext-its-metainfo
248 %defattr(644,root,root,755)
249 %{_datadir}/gettext/its/metainfo.its
250 %{_datadir}/gettext/its/metainfo.loc
251
252 %if %{with vala}
253 %files -n vala-appstream
254 %defattr(644,root,root,755)
255 %{_datadir}/vala/vapi/appstream.deps
256 %{_datadir}/vala/vapi/appstream.vapi
257 %endif
This page took 0.112826 seconds and 3 git commands to generate.