]>
Commit | Line | Data |
---|---|---|
f27661b8 JB |
1 | # |
2 | # Conditional build: | |
c7a4424e JB |
3 | %bcond_with alpm # Arch Linux PacMan support |
4 | %bcond_with stemmer # search stemmer based on libstemmer | |
5 | %bcond_without static_libs # static libraries | |
dc0e2239 | 6 | |
08ba24e9 JB |
7 | Summary: GLib Objects and helper methods for reading and writing AppStream metadata |
8 | Summary(pl.UTF-8): Obiekty GLiba i metody pomocnicze do odczytu i zapisu metadanych AppStream | |
9 | Name: appstream-glib | |
80eed6d9 | 10 | Version: 0.7.14 |
cc2c9f16 | 11 | Release: 1 |
08ba24e9 JB |
12 | License: LGPL v2.1+ |
13 | Group: Libraries | |
99b53f56 | 14 | Source0: https://people.freedesktop.org/~hughsient/appstream-glib/releases/%{name}-%{version}.tar.xz |
80eed6d9 | 15 | # Source0-md5: 48811c1105ce8b37ac274c6bf101075b |
77502258 | 16 | Patch0: %{name}-rpm5.patch |
99fb326e | 17 | Patch1: %{name}-stemmer.patch |
c7a4424e | 18 | Patch2: %{name}-pc.patch |
99b53f56 | 19 | URL: https://people.freedesktop.org/~hughsient/appstream-glib/ |
f27661b8 | 20 | %{?with_alpm:BuildRequires: alpm-devel} |
77502258 JB |
21 | BuildRequires: docbook-dtd43-xml |
22 | BuildRequires: docbook-style-xsl | |
a4e4c62e | 23 | BuildRequires: fontconfig-devel |
0c3985a1 JB |
24 | # pkgconfig(freetype2) >= 9.10.0 |
25 | BuildRequires: freetype-devel >= 1:2.2.1 | |
c7a4424e | 26 | BuildRequires: gcab-devel >= 1.0 |
3f5284c4 | 27 | BuildRequires: gcc >= 5:3.2 |
c440ce23 | 28 | BuildRequires: gdk-pixbuf2-devel >= 2.31.5 |
3f5284c4 | 29 | BuildRequires: gettext-tools >= 0.19.7 |
c440ce23 | 30 | BuildRequires: glib2-devel >= 1:2.45.8 |
08ba24e9 JB |
31 | BuildRequires: gobject-introspection-devel >= 0.9.8 |
32 | BuildRequires: gperf | |
77502258 | 33 | BuildRequires: gtk+3-devel >= 3.0 |
dc0e2239 | 34 | BuildRequires: gtk-doc >= 1.9 |
a4e4c62e | 35 | BuildRequires: intltool >= 0.40.0 |
c7a4424e | 36 | BuildRequires: json-glib-devel >= 1.1.2 |
08ba24e9 | 37 | BuildRequires: libarchive-devel |
c440ce23 | 38 | BuildRequires: libsoup-devel >= 2.52 |
08ba24e9 | 39 | BuildRequires: libstdc++-devel |
3f5284c4 | 40 | %{?with_stemmer:BuildRequires: libstemmer-devel} |
e71a83d4 | 41 | BuildRequires: libuuid-devel |
77502258 | 42 | BuildRequires: libxslt-progs |
c7a4424e | 43 | BuildRequires: meson >= 0.37.0 |
a4e4c62e | 44 | BuildRequires: pango-devel |
08ba24e9 | 45 | BuildRequires: pkgconfig |
77502258 | 46 | BuildRequires: rpm-devel >= 4.5 |
f27661b8 | 47 | BuildRequires: sqlite3-devel >= 3 |
08ba24e9 JB |
48 | BuildRequires: tar >= 1:1.22 |
49 | BuildRequires: xz | |
c7a4424e | 50 | BuildRequires: yaml-devel >= 0.1 |
c440ce23 | 51 | Requires: gdk-pixbuf2 >= 2.31.5 |
dc0e2239 | 52 | Requires: glib2 >= 1:2.45.8 |
c7a4424e | 53 | Requires: json-glib >= 1.1.2 |
c440ce23 | 54 | Requires: libsoup >= 2.52 |
4775b279 JB |
55 | Provides: appdata-tools = %{version} |
56 | Obsoletes: appdata-tools < 0.2 | |
08ba24e9 JB |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
58 | ||
59 | %description | |
60 | AppStream-Glib library provides GObjects and helper methods to make it | |
61 | easy to read and write AppStream metadata. It also provides a simple | |
62 | DOM implementation that makes it easy to edit nodes and convert to and | |
63 | from the standardized XML representation. | |
64 | ||
65 | %description -l pl.UTF-8 | |
66 | Biblioteka AppStream-Glib dostarcza obiekty GLiba (GObject) oraz | |
67 | metody pomocnicze ułatwiające odczyt i zapis metadanych AppStream. | |
68 | Zapewnia także prostą implementację DOM ułatwiającą modyfikowanie | |
69 | węzłów i konwersję do i ze standardowej reprezentacji XML. | |
70 | ||
71 | %package devel | |
72 | Summary: Header files for appstream-glib library | |
73 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki appstream-glib | |
74 | Group: Development/Libraries | |
75 | Requires: %{name} = %{version}-%{release} | |
c7a4424e | 76 | Requires: gcab-devel >= 1.0 |
c440ce23 JB |
77 | Requires: gdk-pixbuf2-devel >= 2.31.5 |
78 | Requires: glib2-devel >= 1:2.45.8 | |
e71a83d4 JB |
79 | Requires: libarchive-devel |
80 | Requires: libuuid-devel | |
08ba24e9 JB |
81 | |
82 | %description devel | |
83 | Header files for appstream-glib library. | |
84 | ||
85 | %description devel -l pl.UTF-8 | |
86 | Pliki nagłówkowe biblioteki appstream-glib. | |
87 | ||
88 | %package static | |
89 | Summary: Static appstream-glib library | |
90 | Summary(pl.UTF-8): Statyczna biblioteka appstream-glib | |
91 | Group: Development/Libraries | |
92 | Requires: %{name}-devel = %{version}-%{release} | |
93 | ||
94 | %description static | |
95 | Static appstream-glib library. | |
96 | ||
97 | %description static -l pl.UTF-8 | |
98 | Statyczna biblioteka appstream-glib. | |
99 | ||
100 | %package apidocs | |
101 | Summary: appstream-glib API documentation | |
102 | Summary(pl.UTF-8): Dokumentacja API biblioteki appstream-glib | |
103 | Group: Documentation | |
dc0e2239 ER |
104 | %if "%{_rpmversion}" >= "5" |
105 | BuildArch: noarch | |
106 | %endif | |
08ba24e9 JB |
107 | |
108 | %description apidocs | |
109 | API documentation for appstream-glib library. | |
110 | ||
111 | %description apidocs -l pl.UTF-8 | |
112 | Dokumentacja API biblioteki appstream-glib. | |
113 | ||
77502258 JB |
114 | %package -n bash-completion-appstream-glib |
115 | Summary: Bash completion for appstream-glib package | |
116 | Summary(pl.UTF-8): Bashowe dopełnianie składni dla pakietu appstream-glib | |
117 | Group: Applications/Shells | |
118 | Requires: %{name} = %{version}-%{release} | |
119 | Requires: bash-completion >= 2.0 | |
120 | ||
121 | %description -n bash-completion-appstream-glib | |
122 | Bash completion for appstream-util command. | |
123 | ||
124 | %description -n bash-completion-appstream-glib -l pl.UTF-8 | |
125 | Bashowe dopełnianie składni polecenia appstream-util. | |
126 | ||
127 | %package -n appstream-builder | |
128 | Summary: AppStreamBuilder library to create AppStream metadata from packages | |
129 | Summary(pl.UTF-8): Biblioteka AppStreamBuilder tworząca metadane AppStream z pakietów | |
130 | Group: Libraries | |
131 | Requires: %{name} = %{version}-%{release} | |
0c3985a1 | 132 | Requires: freetype >= 1:2.2.1 |
77502258 JB |
133 | |
134 | %description -n appstream-builder | |
135 | AppStreamBuilder library to create AppStream metadata from packages. | |
136 | ||
137 | %description -n appstream-builder -l pl.UTF-8 | |
138 | Biblioteka AppStreamBuilder tworząca metadane AppStream z pakietów. | |
139 | ||
140 | %package -n appstream-builder-devel | |
141 | Summary: Header files for AppStreamBuilder library | |
142 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AppStreamBuilder | |
143 | Group: Development/Libraries | |
144 | Requires: %{name}-devel = %{version}-%{release} | |
145 | Requires: appstream-builder = %{version}-%{release} | |
146 | ||
147 | %description -n appstream-builder-devel | |
148 | Header files for AppStreamBuilder library. | |
149 | ||
150 | %description -n appstream-builder-devel -l pl.UTF-8 | |
151 | Pliki nagłówkowe biblioteki AppStreamBuilder. | |
152 | ||
153 | %package -n appstream-builder-static | |
154 | Summary: Static AppStreamBuilder library | |
155 | Summary(pl.UTF-8): Statyczna biblioteka AppStreamBuilder | |
156 | Group: Development/Libraries | |
157 | Requires: appstream-builder-devel = %{version}-%{release} | |
158 | ||
159 | %description -n appstream-builder-static | |
160 | Static AppStreamBuilder library. | |
161 | ||
162 | %description -n appstream-builder-static -l pl.UTF-8 | |
163 | Statyczna biblioteka AppStreamBuilder. | |
164 | ||
165 | %package -n bash-completion-appstream-builder | |
166 | Summary: Bash completion for appstream-builder package | |
167 | Summary(pl.UTF-8): Bashowe dopełnianie składni dla pakietu appstream-builder | |
168 | Group: Applications/Shells | |
169 | Requires: appstream-builder = %{version}-%{release} | |
170 | Requires: bash-completion >= 2.0 | |
171 | ||
172 | %description -n bash-completion-appstream-builder | |
173 | Bash completion for appstream-builder command. | |
174 | ||
175 | %description -n bash-completion-appstream-builder -l pl.UTF-8 | |
176 | Bashowe dopełnianie składni polecenia appstream-builder. | |
177 | ||
08ba24e9 JB |
178 | %prep |
179 | %setup -q | |
77502258 JB |
180 | %patch0 -p1 |
181 | %patch1 -p1 | |
c7a4424e JB |
182 | %patch2 -p1 |
183 | ||
184 | %if %{with static_libs} | |
185 | %{__sed} -i -e 's/shared_library/library/' libappstream-{builder,glib}/meson.build | |
186 | %endif | |
08ba24e9 JB |
187 | |
188 | %build | |
c7a4424e JB |
189 | # for off64_t |
190 | CPPFLAGS="%{rpmcppflags} -D_LARGEFILE64_SOURCE" | |
99fb326e | 191 | %meson build \ |
c7a4424e JB |
192 | -Dalpm=%{__true_false aplm} \ |
193 | -Dstemmer=%{__true_false stemmer} \ | |
99fb326e AM |
194 | -Dgtk-doc=true |
195 | ||
196 | %meson_build -C build | |
08ba24e9 JB |
197 | |
198 | %install | |
199 | rm -rf $RPM_BUILD_ROOT | |
200 | ||
99fb326e | 201 | %meson_install -C build |
e71a83d4 JB |
202 | |
203 | # already in gettext-tools >= 0.19.7 | |
204 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/gettext/its/appdata.{its,loc} | |
77502258 | 205 | |
a4e4c62e JB |
206 | %find_lang %{name} |
207 | ||
08ba24e9 JB |
208 | %clean |
209 | rm -rf $RPM_BUILD_ROOT | |
210 | ||
211 | %post -p /sbin/ldconfig | |
212 | %postun -p /sbin/ldconfig | |
213 | ||
77502258 JB |
214 | %post -n appstream-builder -p /sbin/ldconfig |
215 | %postun -n appstream-builder -p /sbin/ldconfig | |
216 | ||
a4e4c62e | 217 | %files -f %{name}.lang |
08ba24e9 JB |
218 | %defattr(644,root,root,755) |
219 | %doc AUTHORS MAINTAINERS NEWS README.md | |
e71a83d4 | 220 | %attr(755,root,root) %{_bindir}/appstream-compose |
08ba24e9 JB |
221 | %attr(755,root,root) %{_bindir}/appstream-util |
222 | %attr(755,root,root) %{_libdir}/libappstream-glib.so.*.*.* | |
2fb305ec | 223 | %attr(755,root,root) %ghost %{_libdir}/libappstream-glib.so.8 |
08ba24e9 | 224 | %{_libdir}/girepository-1.0/AppStreamGlib-1.0.typelib |
4775b279 | 225 | %{_aclocaldir}/appdata-xml.m4 |
e71a83d4 | 226 | %{_mandir}/man1/appstream-compose.1* |
77502258 | 227 | %{_mandir}/man1/appstream-util.1* |
08ba24e9 JB |
228 | |
229 | %files devel | |
230 | %defattr(644,root,root,755) | |
231 | %attr(755,root,root) %{_libdir}/libappstream-glib.so | |
232 | %{_datadir}/gir-1.0/AppStreamGlib-1.0.gir | |
233 | %{_includedir}/libappstream-glib | |
234 | %{_pkgconfigdir}/appstream-glib.pc | |
77502258 | 235 | %{_aclocaldir}/appstream-xml.m4 |
08ba24e9 | 236 | |
c7a4424e | 237 | %if %{with static_libs} |
08ba24e9 JB |
238 | %files static |
239 | %defattr(644,root,root,755) | |
240 | %{_libdir}/libappstream-glib.a | |
99fb326e | 241 | %endif |
08ba24e9 | 242 | |
77502258 JB |
243 | %files -n bash-completion-appstream-glib |
244 | %defattr(644,root,root,755) | |
dc0e2239 | 245 | %{bash_compdir}/appstream-util |
77502258 | 246 | |
08ba24e9 JB |
247 | %files apidocs |
248 | %defattr(644,root,root,755) | |
249 | %{_gtkdocdir}/appstream-glib | |
77502258 JB |
250 | |
251 | %files -n appstream-builder | |
252 | %defattr(644,root,root,755) | |
253 | %attr(755,root,root) %{_bindir}/appstream-builder | |
254 | %attr(755,root,root) %{_libdir}/libappstream-builder.so.*.*.* | |
2fb305ec | 255 | %attr(755,root,root) %ghost %{_libdir}/libappstream-builder.so.8 |
77502258 | 256 | %{_libdir}/girepository-1.0/AppStreamBuilder-1.0.typelib |
e71a83d4 | 257 | %dir %{_libdir}/asb-plugins-5 |
e71a83d4 | 258 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_appdata.so |
e71a83d4 JB |
259 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_desktop.so |
260 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_font.so | |
261 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_gettext.so | |
262 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_hardcoded.so | |
c7a4424e | 263 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_icon.so |
6387ce59 | 264 | %attr(755,root,root) %{_libdir}/asb-plugins-5/libasb_plugin_shell_extension.so |
77502258 JB |
265 | %{_mandir}/man1/appstream-builder.1* |
266 | ||
267 | %files -n appstream-builder-devel | |
268 | %defattr(644,root,root,755) | |
269 | %attr(755,root,root) %{_libdir}/libappstream-builder.so | |
270 | %{_includedir}/libappstream-builder | |
271 | %{_datadir}/gir-1.0/AppStreamBuilder-1.0.gir | |
272 | %{_pkgconfigdir}/appstream-builder.pc | |
273 | ||
c7a4424e | 274 | %if %{with static_libs} |
77502258 JB |
275 | %files -n appstream-builder-static |
276 | %defattr(644,root,root,755) | |
277 | %{_libdir}/libappstream-builder.a | |
99fb326e | 278 | %endif |
77502258 JB |
279 | |
280 | %files -n bash-completion-appstream-builder | |
281 | %defattr(644,root,root,755) | |
dc0e2239 | 282 | %{bash_compdir}/appstream-builder |