]>
Commit | Line | Data |
---|---|---|
93b0aff6 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation build | |
ca5d3962 | 4 | %bcond_without qt # Qt library (libappstream-qt) |
93b0aff6 | 5 | %bcond_without vala # Vala API (VAPI) |
e119917a | 6 | |
93b0aff6 JB |
7 | Summary: AppStream-Core library and tools |
8 | Summary(pl.UTF-8): Biblioteka i narzędzia AppStream-Core | |
9 | Name: AppStream | |
9c78b344 | 10 | Version: 0.8.6 |
c478a3e4 | 11 | Release: 1 |
ca5d3962 | 12 | License: LGPL v2.1+ |
93b0aff6 | 13 | Group: Libraries |
ca5d3962 | 14 | Source0: http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz |
9c78b344 | 15 | # Source0-md5: 6ef680f00a9f888ea3feb658883bf655 |
93b0aff6 | 16 | URL: http://www.freedesktop.org/wiki/Distributions/AppStream/Software/ |
9c78b344 | 17 | BuildRequires: cmake >= 3.2.0 |
6395dea7 | 18 | BuildRequires: gettext-tools |
93b0aff6 JB |
19 | BuildRequires: glib2-devel >= 1:2.36 |
20 | BuildRequires: gobject-introspection-devel | |
21 | BuildRequires: intltool | |
22 | BuildRequires: libstdc++-devel | |
23 | BuildRequires: libxml2-devel >= 2.0 | |
24 | BuildRequires: pkgconfig | |
309888e2 | 25 | BuildRequires: protobuf-devel |
ca5d3962 | 26 | BuildRequires: tar >= 1:1.22 |
93b0aff6 JB |
27 | %{?with_vala:BuildRequires: vala} |
28 | BuildRequires: xapian-core-devel >= 1.2 | |
ca5d3962 | 29 | BuildRequires: xz |
4c88c945 | 30 | BuildRequires: yaml-devel >= 0.1 |
112490e9 | 31 | %if %{with qt} |
112490e9 JB |
32 | BuildRequires: Qt5Core-devel >= 5.0 |
33 | BuildRequires: qt5-qmake >= 5.0 | |
34 | %endif | |
93b0aff6 JB |
35 | %if %{with apidocs} |
36 | BuildRequires: gtk-doc | |
37 | BuildRequires: publican | |
38 | BuildRequires: xmlto | |
39 | %endif | |
40 | Requires: glib2 >= 1:2.36 | |
41 | Requires: xapian-core-libs >= 1.2 | |
4c88c945 | 42 | Obsoletes: PackageKit-plugin-appstream |
93b0aff6 JB |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
45 | %description | |
46 | AppStream-Core library and tools to access the AppStream component | |
47 | database. | |
48 | ||
49 | %description -l pl.UTF-8 | |
50 | Biblioteka i narzędzia AppStream-Core służące do dostępu do bazy | |
51 | danych komponentu AppStream. | |
52 | ||
53 | %package devel | |
54 | Summary: Header files for AppStream library | |
55 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStream | |
56 | Group: Development/Libraries | |
57 | Requires: %{name} = %{version}-%{release} | |
58 | Requires: glib2-devel >= 1:2.36 | |
59 | ||
60 | %description devel | |
61 | Header files for AppStream library. | |
62 | ||
63 | %description devel -l pl.UTF-8 | |
64 | Pliki nagłówkowe biblioteki AppStream. | |
65 | ||
66 | %package apidocs | |
67 | Summary: AppStream API documentation | |
68 | Summary(pl.UTF-8): Dokumentacja API biblioteki AppStream | |
69 | Group: Documentation | |
e119917a ER |
70 | %if "%{_rpmversion}" >= "5" |
71 | BuildArch: noarch | |
72 | %endif | |
93b0aff6 JB |
73 | |
74 | %description apidocs | |
75 | API documentation for AppStream library. | |
76 | ||
77 | %description apidocs -l pl.UTF-8 | |
78 | Dokumentacja API biblioteki AppStream. | |
79 | ||
ca5d3962 JB |
80 | %package qt |
81 | Summary: AppstreamQt library | |
82 | Summary(pl.UTF-8): Biblioteka AppstreamQt | |
83 | Group: Libraries | |
112490e9 | 84 | Requires: Qt5Core >= 5.0 |
ca5d3962 JB |
85 | Requires: xapian-core-libs >= 1.2 |
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} | |
112490e9 | 98 | Requires: Qt5Core-devel >= 5.0 |
ca5d3962 JB |
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 | ||
93b0aff6 JB |
106 | %package -n vala-appstream |
107 | Summary: Vala API for AppStream library | |
108 | Summary(pl.UTF-8): API języka Vala do biblioteki AppStream | |
109 | Group: Development/Libraries | |
110 | Requires: %{name}-devel = %{version}-%{release} | |
111 | Requires: vala | |
112 | ||
113 | %description -n vala-appstream | |
114 | Vala API for AppStream library. | |
115 | ||
116 | %description -n vala-appstream -l pl.UTF-8 | |
117 | API języka Vala do biblioteki AppStream. | |
118 | ||
93b0aff6 JB |
119 | %prep |
120 | %setup -q | |
121 | ||
122 | %build | |
123 | install -d build | |
124 | cd build | |
125 | %cmake .. \ | |
126 | %{?with_apidocs:-DDOCUMENTATION=ON} \ | |
c478a3e4 | 127 | %{?with_qt:-DQT=ON} \ |
93b0aff6 JB |
128 | %{?with_vala:-DVAPI=ON} |
129 | ||
031678ad | 130 | %{__make} -j1 |
93b0aff6 JB |
131 | |
132 | %install | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %{__make} -C build install \ | |
136 | DESTDIR=$RPM_BUILD_ROOT | |
137 | ||
ca5d3962 JB |
138 | install -d $RPM_BUILD_ROOT%{_docdir} |
139 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc $RPM_BUILD_ROOT%{_docdir} | |
140 | ||
141 | %find_lang appstream | |
142 | ||
93b0aff6 JB |
143 | %clean |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | ||
146 | %post -p /sbin/ldconfig | |
147 | %postun -p /sbin/ldconfig | |
148 | ||
ca5d3962 JB |
149 | %post qt -p /sbin/ldconfig |
150 | %postun qt -p /sbin/ldconfig | |
151 | ||
152 | %files -f appstream.lang | |
93b0aff6 | 153 | %defattr(644,root,root,755) |
4c88c945 | 154 | %doc AUTHORS MAINTAINERS NEWS README.md RELEASE |
c478a3e4 | 155 | %attr(755,root,root) %{_bindir}/appstreamcli |
93b0aff6 | 156 | %attr(755,root,root) %{_libdir}/libappstream.so.*.*.* |
f1db7849 | 157 | %attr(755,root,root) %ghost %{_libdir}/libappstream.so.2 |
112490e9 | 158 | %{_libdir}/girepository-1.0/AppStream-0.8.typelib |
93b0aff6 JB |
159 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/appstream.conf |
160 | %dir %{_datadir}/app-info | |
161 | %{_datadir}/app-info/categories.xml | |
c478a3e4 | 162 | %{_mandir}/man1/appstreamcli.1* |
93b0aff6 JB |
163 | |
164 | %files devel | |
165 | %defattr(644,root,root,755) | |
166 | %attr(755,root,root) %{_libdir}/libappstream.so | |
112490e9 | 167 | %{_datadir}/gir-1.0/AppStream-0.8.gir |
4c88c945 | 168 | %{_includedir}/AppStream |
93b0aff6 JB |
169 | %{_pkgconfigdir}/appstream.pc |
170 | ||
171 | %if %{with apidocs} | |
172 | %files apidocs | |
173 | %defattr(644,root,root,755) | |
112490e9 | 174 | %{_docdir}/appstream |
ca5d3962 JB |
175 | %{_gtkdocdir}/appstream |
176 | %endif | |
177 | ||
178 | %if %{with qt} | |
179 | %files qt | |
180 | %defattr(644,root,root,755) | |
181 | %attr(755,root,root) %{_libdir}/libAppstreamQt.so.*.*.* | |
112490e9 | 182 | %attr(755,root,root) %ghost %{_libdir}/libAppstreamQt.so.1 |
ca5d3962 JB |
183 | |
184 | %files qt-devel | |
185 | %defattr(644,root,root,755) | |
186 | %attr(755,root,root) %{_libdir}/libAppstreamQt.so | |
187 | %{_includedir}/AppstreamQt | |
188 | %{_libdir}/cmake/AppstreamQt | |
93b0aff6 JB |
189 | %endif |
190 | ||
191 | %if %{with vala} | |
192 | %files -n vala-appstream | |
193 | %defattr(644,root,root,755) | |
194 | %{_datadir}/vala/vapi/appstream.vapi | |
195 | %endif |