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