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