]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - use -Dmultiarch for arch-dependent binaries? (like gio-querymodules or gio-launch-desktop) | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without apidocs # gtk-doc based API documentation | |
6 | %bcond_without static_libs # static library | |
7 | %bcond_without selinux # SELinux support in gio | |
8 | %bcond_with sysprof # sysprof tracing support | |
9 | %bcond_without systemtap # systemtap/dtrace tracing support | |
10 | ||
11 | Summary: Useful routines for 'C' programming | |
12 | Summary(cs.UTF-8): Šikovná knihovna s funkcemi pro pomocné programy | |
13 | Summary(da.UTF-8): Nyttige biblioteksfunktioner | |
14 | Summary(de.UTF-8): Eine nützliche Library von Dienstprogramm-Funktionen | |
15 | Summary(es.UTF-8): Conjunto de funciones gráficas utilitarias | |
16 | Summary(fi.UTF-8): Kirjasto, jossa on työkalufunktioita | |
17 | Summary(fr.UTF-8): Bibliothèque de fonctions utilitaires | |
18 | Summary(ja.UTF-8): 便利なユーティリティ関数のライブラリ | |
19 | Summary(pl.UTF-8): Biblioteka zawierająca wiele użytecznych funkcji C | |
20 | Summary(pt_BR.UTF-8): Conjunto de funções gráficas utilitárias | |
21 | Summary(tr.UTF-8): Yararlı ufak yordamlar kitaplığı | |
22 | Summary(zh_CN.UTF-8): 实用工具函数库 | |
23 | Name: glib2 | |
24 | Version: 2.78.4 | |
25 | Release: 1 | |
26 | Epoch: 1 | |
27 | License: LGPL v2+ | |
28 | Group: Libraries | |
29 | Source0: https://download.gnome.org/sources/glib/2.78/glib-%{version}.tar.xz | |
30 | # Source0-md5: 0781e889cab64f1f7dbb6e8357c6a95f | |
31 | Patch0: %{name}-python_shebang.patch | |
32 | Patch1: gtk-doc-build.patch | |
33 | URL: https://www.gtk.org/ | |
34 | BuildRequires: automake | |
35 | BuildRequires: docbook-dtd412-xml | |
36 | BuildRequires: docbook-dtd45-xml | |
37 | BuildRequires: docbook-style-xsl-nons | |
38 | BuildRequires: elfutils-devel | |
39 | BuildRequires: gettext-tools | |
40 | %if %(locale -a | grep -q '^C\.utf8$'; echo $?) | |
41 | BuildRequires: glibc-localedb-all | |
42 | %endif | |
43 | BuildRequires: libffi-devel >= 3.0.0 | |
44 | BuildRequires: libmount-devel >= 2.28 | |
45 | %{?with_selinux:BuildRequires: libselinux-devel >= 2.2} | |
46 | BuildRequires: libstdc++-devel | |
47 | BuildRequires: libxslt-progs | |
48 | BuildRequires: meson >= 0.60.0 | |
49 | BuildRequires: ninja >= 1.5 | |
50 | BuildRequires: pcre2-8-devel >= 10.32 | |
51 | BuildRequires: perl-base | |
52 | BuildRequires: pkgconfig >= 1:0.16 | |
53 | # in case of separate libelf (elfutils don't provide .pc file) | |
54 | #BuildRequires: pkgconfig(libelf) >= 0.8.12 | |
55 | BuildRequires: pkgconfig(libffi) >= 3.0.0 | |
56 | BuildRequires: python3 >= 1:3.5 | |
57 | BuildRequires: python3-modules >= 1:3.5 | |
58 | BuildRequires: rpm-build >= 4.6 | |
59 | BuildRequires: rpm-perlprov | |
60 | BuildRequires: rpm-pythonprov | |
61 | BuildRequires: rpmbuild(macros) >= 1.752 | |
62 | BuildRequires: sed >= 4.0 | |
63 | %{?with_sysprof:BuildRequires: sysprof-devel >= 3.38.0} | |
64 | %{?with_systemtap:BuildRequires: systemtap-sdt-devel} | |
65 | BuildRequires: tar >= 1:1.22 | |
66 | BuildRequires: xz | |
67 | BuildRequires: zlib-devel | |
68 | %if %{with apidocs} | |
69 | BuildRequires: docutils >= 0.13.1 | |
70 | BuildRequires: gtk-doc >= 1.32.1 | |
71 | %endif | |
72 | Requires: iconv | |
73 | Requires: libmount >= 2.28 | |
74 | %{?with_selinux:Requires: libselinux >= 2.2} | |
75 | Requires: pcre2-8 >= 10.32 | |
76 | Suggests: gvfs | |
77 | Provides: glib2-libs | |
78 | Obsoletes: glib2-libs < 1:2.12.11-3 | |
79 | # see https://bugzilla.xfce.org/show_bug.cgi?id=9709 | |
80 | Conflicts: xfce4-session < 4.10.0-5 | |
81 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
82 | ||
83 | %description | |
84 | GLib, is a library which includes support routines for C such as | |
85 | lists, trees, hashes, memory allocation, and many other things. GLib | |
86 | includes also generally useful data structures used by GIMP and many | |
87 | other. | |
88 | ||
89 | %description -l cs.UTF-8 | |
90 | Šikovná knihovna s funkcemi pro pomocné programy. Vývojové knihovny a | |
91 | hlavičky jsou v balíčku glib-devel. | |
92 | ||
93 | %description -l da.UTF-8 | |
94 | Nyttigt bibliotek med forskellige funktioner. Udviklings- biblioteker | |
95 | og headerfiler er i glib-devel pakken. | |
96 | ||
97 | %description -l de.UTF-8 | |
98 | Eine nützliche Library von Dienstprogramm-Funktionen. | |
99 | Entwicklungs-Libraries und Header befinden sich in glib-devel. | |
100 | ||
101 | %description -l es.UTF-8 | |
102 | Conjunto de funciones utilitarias. Bibliotecas de desarrollo y | |
103 | archivos de inclusión están en glib-devel. | |
104 | ||
105 | %description -l fi.UTF-8 | |
106 | Kirjasto, jossa on työkalufunktioita. Kehitysversiot ja | |
107 | header-tiedostot ovat glib-devel-paketissa. | |
108 | ||
109 | %description -l ja.UTF-8 | |
110 | GLibはユーティリティ関数を集めた便利なライブラリです。このC言語用ライブラリは、 | |
111 | いくつかの問題を解決するよう設計されており、多くのプログラムから要求される使いやすい 関数を提供します。 | |
112 | ||
113 | GLibはGDK, GTK+他多くのアプリケーションで利用される。このライブラリに依存するアプリケーション | |
114 | 等のためにこのglibパッケージをインストールしてください。 | |
115 | ||
116 | %description -l pl.UTF-8 | |
117 | GLib jest zestawem bibliotek zawierających funkcje do obsługi list i | |
118 | drzew, funkcje mieszające, funkcje do alokacji pamięci i dużo innych | |
119 | podstawowych funkcji i różnych struktur danych używanych przez program | |
120 | GIMP i wiele innych. | |
121 | ||
122 | %description -l pt_BR.UTF-8 | |
123 | Conjunto de funções utilitárias. Bibliotecas de desenvolvimento e | |
124 | arquivos de inclusão estão em glib-devel. | |
125 | ||
126 | %description -l tr.UTF-8 | |
127 | Yararlı yordamlar kitaplığı. Geliştirme kitaplıkları ve başlık | |
128 | dosyaları glib-devel paketinde yer almaktadır. | |
129 | ||
130 | %package devel | |
131 | Summary: GLib heades files, documentation | |
132 | Summary(es.UTF-8): Conjunto de funciones gráficas utilitarias para desarrollo | |
133 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do GLib | |
134 | Summary(pt_BR.UTF-8): Conjunto de ferramentas e biblioteca do kit de desenho do GIMP | |
135 | Group: Development/Libraries | |
136 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
137 | Requires: libffi-devel >= 3.0.0 | |
138 | Requires: libmount-devel >= 2.28 | |
139 | Requires: pcre2-8-devel >= 10.32 | |
140 | Requires: python3-modules >= 1:3.5 | |
141 | # gio only | |
142 | %{?with_selinux:Requires: libselinux-devel >= 2.2} | |
143 | Requires: zlib-devel | |
144 | ||
145 | %description devel | |
146 | Header files for the support library for the GIMP's X libraries, which | |
147 | are available as public libraries. GLib includes generally useful data | |
148 | structures. | |
149 | ||
150 | %description devel -l es.UTF-8 | |
151 | Conjunto de funciones gráficas utilitarias para desarrollo. | |
152 | ||
153 | %description devel -l ja.UTF-8 | |
154 | glib2-develパッケージには、一般ライブラリとして有効なGIMPのXライブラリ群 | |
155 | (GtkとGDK)をサポートするライブラリ向けにスタティックライブラリとヘッダが 含まれています。 | |
156 | ||
157 | もしGLibを使ってプログラムを開発するならば、glib-develパッケージをインスト ールしてください。 | |
158 | ||
159 | %description devel -l pl.UTF-8 | |
160 | Pliki nagłówkowe i dokumentacja do GLib przydatna przy pisaniu | |
161 | programów wykorzystujących tę bibliotekę. | |
162 | ||
163 | %description devel -l pt_BR.UTF-8 | |
164 | Bibliotecas e arquivos de inclusão para a biblioteca de suporte para | |
165 | as bibliotecas X do GIMP, que são disponíveis como bibliotecas | |
166 | públicas. A GLib inclui estruturas de dados genéricas úteis. | |
167 | ||
168 | %package static | |
169 | Summary: Static GLib libraries | |
170 | Summary(pl.UTF-8): Biblioteki statyczne GLib | |
171 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com GLib | |
172 | Group: Development/Libraries | |
173 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
174 | Requires: pcre2-8-static | |
175 | ||
176 | %description static | |
177 | Static GLib libraries. | |
178 | ||
179 | %description static -l pl.UTF-8 | |
180 | Biblioteki statyczne GLib. | |
181 | ||
182 | %description static -l pt_BR.UTF-8 | |
183 | Bibliotecas estáticas para desenvolvimento com GLib. | |
184 | ||
185 | %package apidocs | |
186 | Summary: GLib API documetation | |
187 | Summary(pl.UTF-8): Dokumentacja API GLib | |
188 | Group: Documentation | |
189 | Requires: gtk-doc-common | |
190 | BuildArch: noarch | |
191 | ||
192 | %description apidocs | |
193 | GLib API documetation. | |
194 | ||
195 | %description apidocs -l pl.UTF-8 | |
196 | Dokumentacja API GLib. | |
197 | ||
198 | %package gdb | |
199 | Summary: GDB Python pretty printers for GObject/GLib types | |
200 | Summary(pl.UTF-8): Skrypty Pythona dla GDB do ładnego wypisywania typów GObject/GLib | |
201 | Group: Development/Debuggers | |
202 | Requires: gdb | |
203 | ||
204 | %description gdb | |
205 | GDB Python pretty printers for GObject/GLib types. This includes | |
206 | support for GObject pointer pretty printing and signal frame | |
207 | compression in backtraces. | |
208 | ||
209 | %description gdb -l pl.UTF-8 | |
210 | Skrypty Pythona dla GDB do ładnego wypisywania typów GObject/GLib. | |
211 | Obejmują także ładne wypisywanie wskaźników GObject oraz kompresję | |
212 | ramek sygnagłów w zrzutach wywołań (backtrace). | |
213 | ||
214 | %package -n bash-completion-gio | |
215 | Summary: bash-completion for gio utilities | |
216 | Summary(pl.UTF-8): Bashowe uzupełnianie nazw dla narzędzi gio | |
217 | Group: Applications/Shells | |
218 | Requires: bash-completion >= 1:2.0 | |
219 | Obsoletes: bash-completion-gdbus < 1:2.26.0-4 | |
220 | BuildArch: noarch | |
221 | ||
222 | %description -n bash-completion-gio | |
223 | bash-completion for gio utilities: gdbus and gsettings. | |
224 | ||
225 | %description -n bash-completion-gio -l pl.UTF-8 | |
226 | Bashowe uzupełnianie nazw dla narzędzi gio: gdbus i gsettings. | |
227 | ||
228 | %package -n systemtap-glib2 | |
229 | Summary: systemtap/dtrace probes for GLib 2 | |
230 | Summary(pl.UTF-8): Sondy systemtap/dtrace dla GLib 2 | |
231 | Group: Development/Tools | |
232 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
233 | Requires: systemtap-client | |
234 | ||
235 | %description -n systemtap-glib2 | |
236 | systemtap/dtrace probes for GLib 2. | |
237 | ||
238 | %description -n systemtap-glib2 -l pl.UTF-8 | |
239 | Sondy systemtap/dtrace dla GLib 2. | |
240 | ||
241 | %prep | |
242 | %setup -q -n glib-%{version} | |
243 | %patch0 -p1 | |
244 | %patch1 -p1 | |
245 | ||
246 | %build | |
247 | %meson build \ | |
248 | %{?debug:--debug} \ | |
249 | -Ddtrace=%{__true_false systemtap} \ | |
250 | -Dsystemtap=%{__true_false systemtap} \ | |
251 | %ifarch %{ix86} | |
252 | %{?with_systemtap:-Dtapset_install_dir=%{_datadir}/systemtap/tapset/i386} \ | |
253 | %endif | |
254 | -Dgtk_doc=%{__true_false apidocs} \ | |
255 | -Dselinux=%{?with_selinux:enabled}%{!?with_selinux:disabled} \ | |
256 | %{?with_sysprof:-Dsysprof=enabled} \ | |
257 | -Dman=true | |
258 | ||
259 | %ninja_build -C build | |
260 | ||
261 | %install | |
262 | rm -rf $RPM_BUILD_ROOT | |
263 | ||
264 | install -d $RPM_BUILD_ROOT%{_libdir}/gio/modules | |
265 | ||
266 | %ninja_install -C build | |
267 | ||
268 | %if %{with apidocs} | |
269 | # gvariant documentation (generated by rst2html5) | |
270 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/glib-2.0 $RPM_BUILD_ROOT%{_gtkdocdir} | |
271 | %endif | |
272 | ||
273 | > $RPM_BUILD_ROOT%{_libdir}/gio/modules/giomodule.cache | |
274 | > $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/gschemas.compiled | |
275 | ||
276 | %py3_comp $RPM_BUILD_ROOT%{_datadir}/glib-2.0/gdb | |
277 | %py3_ocomp $RPM_BUILD_ROOT%{_datadir}/glib-2.0/gdb | |
278 | ||
279 | # adjust for compatibility with names supported by glibc | |
280 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sr@ije,sr@ijekavian} | |
281 | ||
282 | # not supported by glibc yet | |
283 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ie | |
284 | ||
285 | %find_lang glib20 | |
286 | ||
287 | %clean | |
288 | rm -rf $RPM_BUILD_ROOT | |
289 | ||
290 | %post | |
291 | /sbin/ldconfig | |
292 | ||
293 | umask 022 | |
294 | %{_bindir}/gio-querymodules %{_libdir}/gio/modules || : | |
295 | ||
296 | %postun -p /sbin/ldconfig | |
297 | ||
298 | %files -f glib20.lang | |
299 | %defattr(644,root,root,755) | |
300 | %doc README.md NEWS SECURITY.md | |
301 | %attr(755,root,root) %{_bindir}/gapplication | |
302 | %attr(755,root,root) %{_bindir}/gdbus | |
303 | %attr(755,root,root) %{_bindir}/gio | |
304 | %attr(755,root,root) %{_bindir}/gio-querymodules | |
305 | %attr(755,root,root) %{_bindir}/glib-compile-schemas | |
306 | %attr(755,root,root) %{_bindir}/gsettings | |
307 | %attr(755,root,root) %{_libexecdir}/gio-launch-desktop | |
308 | %attr(755,root,root) %{_libdir}/libgio-2.0.so.*.*.* | |
309 | %attr(755,root,root) %ghost %{_libdir}/libgio-2.0.so.0 | |
310 | %attr(755,root,root) %{_libdir}/libglib-2.0.so.*.*.* | |
311 | %attr(755,root,root) %ghost %{_libdir}/libglib-2.0.so.0 | |
312 | %attr(755,root,root) %{_libdir}/libgmodule-2.0.so.*.*.* | |
313 | %attr(755,root,root) %ghost %{_libdir}/libgmodule-2.0.so.0 | |
314 | %attr(755,root,root) %{_libdir}/libgobject-2.0.so.*.*.* | |
315 | %attr(755,root,root) %ghost %{_libdir}/libgobject-2.0.so.0 | |
316 | %attr(755,root,root) %{_libdir}/libgthread-2.0.so.*.*.* | |
317 | %attr(755,root,root) %ghost %{_libdir}/libgthread-2.0.so.0 | |
318 | %dir %{_libdir}/gio | |
319 | %dir %{_libdir}/gio/modules | |
320 | %ghost %{_libdir}/gio/modules/giomodule.cache | |
321 | %dir %{_datadir}/glib-2.0 | |
322 | %dir %{_datadir}/glib-2.0/schemas | |
323 | %ghost %{_datadir}/glib-2.0/schemas/gschemas.compiled | |
324 | %{_mandir}/man1/gapplication.1* | |
325 | %{_mandir}/man1/gdbus.1* | |
326 | %{_mandir}/man1/gio.1* | |
327 | %{_mandir}/man1/gio-querymodules.1* | |
328 | %{_mandir}/man1/glib-compile-schemas.1* | |
329 | %{_mandir}/man1/gsettings.1* | |
330 | ||
331 | %files devel | |
332 | %defattr(644,root,root,755) | |
333 | %attr(755,root,root) %{_bindir}/gdbus-codegen | |
334 | %attr(755,root,root) %{_bindir}/glib-compile-resources | |
335 | %attr(755,root,root) %{_bindir}/glib-genmarshal | |
336 | %attr(755,root,root) %{_bindir}/glib-gettextize | |
337 | %attr(755,root,root) %{_bindir}/glib-mkenums | |
338 | %attr(755,root,root) %{_bindir}/gobject-query | |
339 | %attr(755,root,root) %{_bindir}/gresource | |
340 | %attr(755,root,root) %{_bindir}/gtester | |
341 | %attr(755,root,root) %{_bindir}/gtester-report | |
342 | %attr(755,root,root) %{_libdir}/libgio-2.0.so | |
343 | %attr(755,root,root) %{_libdir}/libglib-2.0.so | |
344 | %attr(755,root,root) %{_libdir}/libgmodule-2.0.so | |
345 | %attr(755,root,root) %{_libdir}/libgobject-2.0.so | |
346 | %attr(755,root,root) %{_libdir}/libgthread-2.0.so | |
347 | %{_libdir}/glib-2.0 | |
348 | %{_includedir}/gio-unix-2.0 | |
349 | %{_includedir}/glib-2.0 | |
350 | %dir %{_datadir}/glib-2.0/codegen | |
351 | %{_datadir}/glib-2.0/codegen/*.py* | |
352 | %{_datadir}/glib-2.0/dtds | |
353 | %dir %{_datadir}/glib-2.0/gettext | |
354 | %{_datadir}/glib-2.0/gettext/po | |
355 | %{_datadir}/glib-2.0/schemas/gschema.dtd | |
356 | %{_datadir}/glib-2.0/valgrind | |
357 | %{_datadir}/gettext/its/gschema.its | |
358 | %{_datadir}/gettext/its/gschema.loc | |
359 | %{_pkgconfigdir}/gio-2.0.pc | |
360 | %{_pkgconfigdir}/gio-unix-2.0.pc | |
361 | %{_pkgconfigdir}/glib-2.0.pc | |
362 | %{_pkgconfigdir}/gmodule-2.0.pc | |
363 | %{_pkgconfigdir}/gmodule-export-2.0.pc | |
364 | %{_pkgconfigdir}/gmodule-no-export-2.0.pc | |
365 | %{_pkgconfigdir}/gobject-2.0.pc | |
366 | %{_pkgconfigdir}/gthread-2.0.pc | |
367 | %{_aclocaldir}/glib-2.0.m4 | |
368 | %{_aclocaldir}/glib-gettext.m4 | |
369 | %{_aclocaldir}/gsettings.m4 | |
370 | %{_mandir}/man1/gdbus-codegen.1* | |
371 | %{_mandir}/man1/glib-compile-resources.1* | |
372 | %{_mandir}/man1/glib-genmarshal.1* | |
373 | %{_mandir}/man1/glib-gettextize.1* | |
374 | %{_mandir}/man1/glib-mkenums.1* | |
375 | %{_mandir}/man1/gobject-query.1* | |
376 | %{_mandir}/man1/gresource.1* | |
377 | %{_mandir}/man1/gtester-report.1* | |
378 | %{_mandir}/man1/gtester.1* | |
379 | ||
380 | %if %{with static_libs} | |
381 | %files static | |
382 | %defattr(644,root,root,755) | |
383 | %{_libdir}/libgio-2.0.a | |
384 | %{_libdir}/libglib-2.0.a | |
385 | %{_libdir}/libgmodule-2.0.a | |
386 | %{_libdir}/libgobject-2.0.a | |
387 | %{_libdir}/libgthread-2.0.a | |
388 | %endif | |
389 | ||
390 | %if %{with apidocs} | |
391 | %files apidocs | |
392 | %defattr(644,root,root,755) | |
393 | %{_gtkdocdir}/gio | |
394 | %{_gtkdocdir}/glib | |
395 | %{_gtkdocdir}/glib-2.0 | |
396 | %{_gtkdocdir}/gobject | |
397 | %endif | |
398 | ||
399 | %files gdb | |
400 | %defattr(644,root,root,755) | |
401 | %{_datadir}/gdb/auto-load/usr/%{_lib}/libglib-2.0.so.*.*.*-gdb.py | |
402 | %{_datadir}/gdb/auto-load/usr/%{_lib}/libgobject-2.0.so.*.*.*-gdb.py | |
403 | %{_datadir}/glib-2.0/gdb | |
404 | ||
405 | %files -n bash-completion-gio | |
406 | %defattr(644,root,root,755) | |
407 | %{bash_compdir}/gapplication | |
408 | %{bash_compdir}/gdbus | |
409 | %{bash_compdir}/gio | |
410 | %{bash_compdir}/gresource | |
411 | %{bash_compdir}/gsettings | |
412 | ||
413 | %if %{with systemtap} | |
414 | %files -n systemtap-glib2 | |
415 | %defattr(644,root,root,755) | |
416 | %{_datadir}/systemtap/tapset/*/libgio-2.0*.stp | |
417 | %{_datadir}/systemtap/tapset/*/libglib-2.0*.stp | |
418 | %{_datadir}/systemtap/tapset/*/libgobject-2.0*.stp | |
419 | %endif |