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