]> git.pld-linux.org Git - packages/AppStream.git/blob - AppStream.spec
- updated to 0.7.5
[packages/AppStream.git] / AppStream.spec
1 # TODO: qt5 support (on bcond? devel package not parallel installable with qt4, only soname differs)
2 #
3 # Conditional build:
4 %bcond_without  apidocs         # API documentation build
5 %bcond_without  qt              # Qt library (libappstream-qt)
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.7.5
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:  25c9d393787a1db04ed418be4be21caa
17 Patch0:         %{name}-cmake.patch
18 URL:            http://www.freedesktop.org/wiki/Distributions/AppStream/Software/
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 BuildRequires:  yaml-devel >= 0.1
34 %if %{with apidocs}
35 BuildRequires:  gtk-doc
36 BuildRequires:  publican
37 BuildRequires:  xmlto
38 %endif
39 Requires:       glib2 >= 1:2.36
40 Requires:       xapian-core-libs >= 1.2
41 Obsoletes:      PackageKit-plugin-appstream
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 AppStream-Core library and tools to access the AppStream component
46 database.
47
48 %description -l pl.UTF-8
49 Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy
50 danych komponentu AppStream.
51
52 %package devel
53 Summary:        Header files for AppStream library
54 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki AppStream
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       glib2-devel >= 1:2.36
58
59 %description devel
60 Header files for AppStream library.
61
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki AppStream.
64
65 %package apidocs
66 Summary:        AppStream API documentation
67 Summary(pl.UTF-8):      Dokumentacja API biblioteki AppStream
68 Group:          Documentation
69
70 %description apidocs
71 API documentation for AppStream library.
72
73 %description apidocs -l pl.UTF-8
74 Dokumentacja API biblioteki AppStream.
75
76 %package qt
77 Summary:        AppstreamQt library
78 Summary(pl.UTF-8):      Biblioteka AppstreamQt
79 Group:          Libraries
80 Requires:       QtCore >= 4.8.0
81 Requires:       xapian-core-libs >= 1.2
82
83 %description qt
84 AppstreamQt library.
85
86 %description qt -l pl.UTF-8
87 Biblioteka AppstreamQt.
88
89 %package qt-devel
90 Summary:        Header files for AppstreamQt library
91 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki AppstreamQt
92 Group:          Libraries
93 Requires:       %{name}-qt = %{version}-%{release}
94 Requires:       QtCore-devel >= 4.8.0
95
96 %description qt-devel
97 Header files for AppstreamQt library.
98
99 %description qt-devel -l pl.UTF-8
100 Pliki nagłówkowe biblioteki AppstreamQt.
101
102 %package -n vala-appstream
103 Summary:        Vala API for AppStream library
104 Summary(pl.UTF-8):      API języka Vala do biblioteki AppStream
105 Group:          Development/Libraries
106 Requires:       %{name}-devel = %{version}-%{release}
107 Requires:       vala
108
109 %description -n vala-appstream
110 Vala API for AppStream library.
111
112 %description -n vala-appstream -l pl.UTF-8
113 API języka Vala do biblioteki AppStream.
114
115 %prep
116 %setup -q
117 %patch0 -p1
118
119 %build
120 install -d build
121 cd build
122 %cmake .. \
123         %{?with_apidocs:-DDOCUMENTATION=ON} \
124         %{?with_qt:-DQT=ON} \
125         %{?with_vala:-DVAPI=ON}
126
127 %{__make} -j1
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131
132 %{__make} -C build install \
133         DESTDIR=$RPM_BUILD_ROOT
134
135 install -d $RPM_BUILD_ROOT%{_docdir}
136 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir}
137
138 %find_lang appstream
139
140 %clean
141 rm -rf $RPM_BUILD_ROOT
142
143 %post   -p /sbin/ldconfig
144 %postun -p /sbin/ldconfig
145
146 %post   qt -p /sbin/ldconfig
147 %postun qt -p /sbin/ldconfig
148
149 %files -f appstream.lang
150 %defattr(644,root,root,755)
151 %doc AUTHORS MAINTAINERS NEWS README.md RELEASE
152 %attr(755,root,root) %{_bindir}/appstream-index
153 %attr(755,root,root) %{_bindir}/appstream-validate
154 %attr(755,root,root) %{_libdir}/libappstream.so.*.*.*
155 %attr(755,root,root) %ghost %{_libdir}/libappstream.so.1
156 %{_libdir}/girepository-1.0/AppStream-0.7.typelib
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
166 %{_datadir}/gir-1.0/AppStream-0.7.gir
167 %{_includedir}/AppStream
168 %{_pkgconfigdir}/appstream.pc
169
170 %if %{with apidocs}
171 %files apidocs
172 %defattr(644,root,root,755)
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
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.038094 seconds and 3 git commands to generate.