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