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