- updated to 0.8.0; now defaults to qt5
[packages/AppStream.git] / AppStream.spec
CommitLineData
93b0aff6
JB
1#
2# Conditional build:
3%bcond_without apidocs # API documentation build
ca5d3962 4%bcond_without qt # Qt library (libappstream-qt)
112490e9 5%bcond_with qt4 # Qt 4.x instead of Qt 5 (note: devel supports only single package at a time)
93b0aff6
JB
6%bcond_without vala # Vala API (VAPI)
7#
8Summary: AppStream-Core library and tools
9Summary(pl.UTF-8): Biblioteka i narzędzia AppStream-Core
10Name: AppStream
112490e9 11Version: 0.8.0
4c88c945 12Release: 1
ca5d3962 13License: LGPL v2.1+
93b0aff6 14Group: Libraries
ca5d3962 15Source0: http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz
112490e9 16# Source0-md5: 9efd0d73f7b0b9391c862cb925b729cf
4c88c945 17Patch0: %{name}-cmake.patch
93b0aff6 18URL: http://www.freedesktop.org/wiki/Distributions/AppStream/Software/
ca5d3962 19BuildRequires: cmake >= 2.8.12
6395dea7 20BuildRequires: gettext-tools
93b0aff6
JB
21BuildRequires: glib2-devel >= 1:2.36
22BuildRequires: gobject-introspection-devel
23BuildRequires: intltool
24BuildRequires: libstdc++-devel
25BuildRequires: libxml2-devel >= 2.0
26BuildRequires: pkgconfig
ca5d3962 27BuildRequires: tar >= 1:1.22
93b0aff6
JB
28%{?with_vala:BuildRequires: vala}
29BuildRequires: xapian-core-devel >= 1.2
ca5d3962 30BuildRequires: xz
4c88c945 31BuildRequires: yaml-devel >= 0.1
112490e9
JB
32%if %{with qt}
33%if %{with qt4}
34BuildRequires: QtCore-devel >= 4.8.0
35BuildRequires: qt4-qmake >= 4.8.0
36%else
37BuildRequires: Qt5Core-devel >= 5.0
38BuildRequires: qt5-qmake >= 5.0
39%endif
40%endif
93b0aff6
JB
41%if %{with apidocs}
42BuildRequires: gtk-doc
43BuildRequires: publican
44BuildRequires: xmlto
45%endif
46Requires: glib2 >= 1:2.36
47Requires: xapian-core-libs >= 1.2
4c88c945 48Obsoletes: PackageKit-plugin-appstream
93b0aff6
JB
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%description
52AppStream-Core library and tools to access the AppStream component
53database.
54
55%description -l pl.UTF-8
56Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy
57danych komponentu AppStream.
58
59%package devel
60Summary: Header files for AppStream library
61Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStream
62Group: Development/Libraries
63Requires: %{name} = %{version}-%{release}
64Requires: glib2-devel >= 1:2.36
65
66%description devel
67Header files for AppStream library.
68
69%description devel -l pl.UTF-8
70Pliki nagłówkowe biblioteki AppStream.
71
72%package apidocs
73Summary: AppStream API documentation
74Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream
75Group: Documentation
76
77%description apidocs
78API documentation for AppStream library.
79
80%description apidocs -l pl.UTF-8
81Dokumentacja API biblioteki AppStream.
82
ca5d3962
JB
83%package qt
84Summary: AppstreamQt library
85Summary(pl.UTF-8): Biblioteka AppstreamQt
86Group: Libraries
112490e9 87%if %{with qt4}
ca5d3962 88Requires: QtCore >= 4.8.0
112490e9
JB
89%else
90Requires: Qt5Core >= 5.0
91%endif
ca5d3962
JB
92Requires: xapian-core-libs >= 1.2
93
94%description qt
95AppstreamQt library.
96
97%description qt -l pl.UTF-8
98Biblioteka AppstreamQt.
99
100%package qt-devel
101Summary: Header files for AppstreamQt library
102Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppstreamQt
103Group: Libraries
104Requires: %{name}-qt = %{version}-%{release}
112490e9 105%if %{with qt4}
ca5d3962 106Requires: QtCore-devel >= 4.8.0
112490e9
JB
107%else
108Requires: Qt5Core-devel >= 5.0
109%endif
ca5d3962
JB
110
111%description qt-devel
112Header files for AppstreamQt library.
113
114%description qt-devel -l pl.UTF-8
115Pliki nagłówkowe biblioteki AppstreamQt.
116
93b0aff6
JB
117%package -n vala-appstream
118Summary: Vala API for AppStream library
119Summary(pl.UTF-8): API języka Vala do biblioteki AppStream
120Group: Development/Libraries
121Requires: %{name}-devel = %{version}-%{release}
122Requires: vala
123
124%description -n vala-appstream
125Vala API for AppStream library.
126
127%description -n vala-appstream -l pl.UTF-8
128API języka Vala do biblioteki AppStream.
129
93b0aff6
JB
130%prep
131%setup -q
5aa25d84 132%patch0 -p1
93b0aff6
JB
133
134%build
135install -d build
136cd build
137%cmake .. \
138 %{?with_apidocs:-DDOCUMENTATION=ON} \
112490e9 139 %{?with_qt:-DQT=ON %{?with_qt4:-DAPPSTREAM_QT_VERSION=4}} \
93b0aff6
JB
140 %{?with_vala:-DVAPI=ON}
141
031678ad 142%{__make} -j1
93b0aff6
JB
143
144%install
145rm -rf $RPM_BUILD_ROOT
146
147%{__make} -C build install \
148 DESTDIR=$RPM_BUILD_ROOT
149
ca5d3962
JB
150install -d $RPM_BUILD_ROOT%{_docdir}
151%{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir}
152
153%find_lang appstream
154
93b0aff6
JB
155%clean
156rm -rf $RPM_BUILD_ROOT
157
158%post -p /sbin/ldconfig
159%postun -p /sbin/ldconfig
160
ca5d3962
JB
161%post qt -p /sbin/ldconfig
162%postun qt -p /sbin/ldconfig
163
164%files -f appstream.lang
93b0aff6 165%defattr(644,root,root,755)
4c88c945 166%doc AUTHORS MAINTAINERS NEWS README.md RELEASE
93b0aff6
JB
167%attr(755,root,root) %{_bindir}/appstream-index
168%attr(755,root,root) %{_bindir}/appstream-validate
169%attr(755,root,root) %{_libdir}/libappstream.so.*.*.*
f1db7849 170%attr(755,root,root) %ghost %{_libdir}/libappstream.so.2
112490e9 171%{_libdir}/girepository-1.0/AppStream-0.8.typelib
93b0aff6
JB
172%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf
173%dir %{_datadir}/app-info
174%{_datadir}/app-info/categories.xml
175%{_mandir}/man1/appstream-index.1*
176%{_mandir}/man1/appstream-validate.1*
177
178%files devel
179%defattr(644,root,root,755)
180%attr(755,root,root) %{_libdir}/libappstream.so
112490e9 181%{_datadir}/gir-1.0/AppStream-0.8.gir
4c88c945 182%{_includedir}/AppStream
93b0aff6
JB
183%{_pkgconfigdir}/appstream.pc
184
185%if %{with apidocs}
186%files apidocs
187%defattr(644,root,root,755)
112490e9 188%{_docdir}/appstream
ca5d3962
JB
189%{_gtkdocdir}/appstream
190%endif
191
192%if %{with qt}
193%files qt
194%defattr(644,root,root,755)
195%attr(755,root,root) %{_libdir}/libAppstreamQt.so.*.*.*
112490e9 196%if %{with qt4}
ca5d3962 197%attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.0
112490e9
JB
198%else
199%attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.1
200%endif
ca5d3962
JB
201
202%files qt-devel
203%defattr(644,root,root,755)
204%attr(755,root,root) %{_libdir}/libAppstreamQt.so
205%{_includedir}/AppstreamQt
206%{_libdir}/cmake/AppstreamQt
93b0aff6
JB
207%endif
208
209%if %{with vala}
210%files -n vala-appstream
211%defattr(644,root,root,755)
212%{_datadir}/vala/vapi/appstream.vapi
213%endif
This page took 0.127108 seconds and 4 git commands to generate.