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