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