noarch apidocs
[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 6%bcond_without vala # Vala API (VAPI)
e119917a 7
93b0aff6
JB
8Summary: AppStream-Core library and tools
9Summary(pl.UTF-8): Biblioteka i narzędzia AppStream-Core
10Name: AppStream
112490e9 11Version: 0.8.0
e119917a 12Release: 2
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
e119917a
ER
76%if "%{_rpmversion}" >= "5"
77BuildArch: noarch
78%endif
93b0aff6
JB
79
80%description apidocs
81API documentation for AppStream library.
82
83%description apidocs -l pl.UTF-8
84Dokumentacja API biblioteki AppStream.
85
ca5d3962
JB
86%package qt
87Summary: AppstreamQt library
88Summary(pl.UTF-8): Biblioteka AppstreamQt
89Group: Libraries
112490e9 90%if %{with qt4}
ca5d3962 91Requires: QtCore >= 4.8.0
112490e9
JB
92%else
93Requires: Qt5Core >= 5.0
94%endif
ca5d3962
JB
95Requires: xapian-core-libs >= 1.2
96
97%description qt
98AppstreamQt library.
99
100%description qt -l pl.UTF-8
101Biblioteka AppstreamQt.
102
103%package qt-devel
104Summary: Header files for AppstreamQt library
105Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppstreamQt
106Group: Libraries
107Requires: %{name}-qt = %{version}-%{release}
112490e9 108%if %{with qt4}
ca5d3962 109Requires: QtCore-devel >= 4.8.0
112490e9
JB
110%else
111Requires: Qt5Core-devel >= 5.0
112%endif
ca5d3962
JB
113
114%description qt-devel
115Header files for AppstreamQt library.
116
117%description qt-devel -l pl.UTF-8
118Pliki nagłówkowe biblioteki AppstreamQt.
119
93b0aff6
JB
120%package -n vala-appstream
121Summary: Vala API for AppStream library
122Summary(pl.UTF-8): API języka Vala do biblioteki AppStream
123Group: Development/Libraries
124Requires: %{name}-devel = %{version}-%{release}
125Requires: vala
126
127%description -n vala-appstream
128Vala API for AppStream library.
129
130%description -n vala-appstream -l pl.UTF-8
131API języka Vala do biblioteki AppStream.
132
93b0aff6
JB
133%prep
134%setup -q
5aa25d84 135%patch0 -p1
93b0aff6
JB
136
137%build
138install -d build
139cd build
140%cmake .. \
141 %{?with_apidocs:-DDOCUMENTATION=ON} \
112490e9 142 %{?with_qt:-DQT=ON %{?with_qt4:-DAPPSTREAM_QT_VERSION=4}} \
93b0aff6
JB
143 %{?with_vala:-DVAPI=ON}
144
031678ad 145%{__make} -j1
93b0aff6
JB
146
147%install
148rm -rf $RPM_BUILD_ROOT
149
150%{__make} -C build install \
151 DESTDIR=$RPM_BUILD_ROOT
152
ca5d3962
JB
153install -d $RPM_BUILD_ROOT%{_docdir}
154%{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir}
155
156%find_lang appstream
157
93b0aff6
JB
158%clean
159rm -rf $RPM_BUILD_ROOT
160
161%post -p /sbin/ldconfig
162%postun -p /sbin/ldconfig
163
ca5d3962
JB
164%post qt -p /sbin/ldconfig
165%postun qt -p /sbin/ldconfig
166
167%files -f appstream.lang
93b0aff6 168%defattr(644,root,root,755)
4c88c945 169%doc AUTHORS MAINTAINERS NEWS README.md RELEASE
93b0aff6
JB
170%attr(755,root,root) %{_bindir}/appstream-index
171%attr(755,root,root) %{_bindir}/appstream-validate
172%attr(755,root,root) %{_libdir}/libappstream.so.*.*.*
f1db7849 173%attr(755,root,root) %ghost %{_libdir}/libappstream.so.2
112490e9 174%{_libdir}/girepository-1.0/AppStream-0.8.typelib
93b0aff6
JB
175%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf
176%dir %{_datadir}/app-info
177%{_datadir}/app-info/categories.xml
178%{_mandir}/man1/appstream-index.1*
179%{_mandir}/man1/appstream-validate.1*
180
181%files devel
182%defattr(644,root,root,755)
183%attr(755,root,root) %{_libdir}/libappstream.so
112490e9 184%{_datadir}/gir-1.0/AppStream-0.8.gir
4c88c945 185%{_includedir}/AppStream
93b0aff6
JB
186%{_pkgconfigdir}/appstream.pc
187
188%if %{with apidocs}
189%files apidocs
190%defattr(644,root,root,755)
112490e9 191%{_docdir}/appstream
ca5d3962
JB
192%{_gtkdocdir}/appstream
193%endif
194
195%if %{with qt}
196%files qt
197%defattr(644,root,root,755)
198%attr(755,root,root) %{_libdir}/libAppstreamQt.so.*.*.*
112490e9 199%if %{with qt4}
ca5d3962 200%attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.0
112490e9
JB
201%else
202%attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.1
203%endif
ca5d3962
JB
204
205%files qt-devel
206%defattr(644,root,root,755)
207%attr(755,root,root) %{_libdir}/libAppstreamQt.so
208%{_includedir}/AppstreamQt
209%{_libdir}/cmake/AppstreamQt
93b0aff6
JB
210%endif
211
212%if %{with vala}
213%files -n vala-appstream
214%defattr(644,root,root,755)
215%{_datadir}/vala/vapi/appstream.vapi
216%endif
This page took 0.326842 seconds and 4 git commands to generate.