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