3 %define with_systemtap 0
5 %define release_flags %{?with_kdbus:+kdbus}
9 Release: 0%{?release_flags}
10 # FIXME: find out if tapsets should really be in devel package or in main package
11 Summary: General-Purpose Utility Library
14 Url: http://www.gtk.org/
15 Source: http://download.gnome.org/sources/glib/%{baseline}/%{name}-%{version}.tar.xz
18 # Not upstream file. Only proposes upstream packages:
19 Source4: glib2-upstream-gnome_defaults.conf
21 # Not depending on gtk-doc shortens bootstrap compilation path.
22 # Please update this file from the latest gtk-doc package:
24 Source99: baselibs.conf
25 Source1001: glib2.manifest
26 BuildRequires: automake
28 BuildRequires: gcc-c++
29 BuildRequires: pkg-config
31 BuildRequires: gettext-tools
32 # gdbus-codegen is run during the build, so we need python-xml
33 BuildRequires: python-xml
34 %if 0%{?with_systemtap}
35 BuildRequires: systemtap-sdt-devel
37 # Needed for gresource
38 BuildRequires: pkgconfig(libelf) >= 0.8.12
39 BuildRequires: pkgconfig(libffi)
40 BuildRequires: pkgconfig(libpcre)
41 BuildRequires: pkgconfig(zlib)
44 GLib is a general-purpose utility library, which provides many useful
45 data types, macros, type conversions, string utilities, file utilities,
46 a main loop abstraction, and so on.
49 Summary: General-Purpose Utility Library -- Tools
52 GLib is a general-purpose utility library, which provides many useful
53 data types, macros, type conversions, string utilities, file utilities,
54 a main loop abstraction, and so on.
56 %package -n gio-branding-upstream
57 Summary: Upstream definitions of default settings and applications
58 Requires: libgio = %{version}
59 Provides: %{name}-branding-upstream = %{version}
60 Obsoletes: %{name}-branding-upstream < %{version}
61 Provides: gio-branding = %{version}
62 Conflicts: otherproviders(gio-branding)
63 Supplements: packageand(libgio:branding-upstream)
65 #BRAND: The /etc/gnome_defaults.conf allows to define arbitrary
66 #BRAND: applications as preferred defaults.
67 #BRAND: A /usr/share/glib-2.0/schemas/$NAME.gschema.override file can
68 #BRAND: be used to override the default value for GSettings keys. See
69 #BRAND: README.Gsettings-overrides for more details. The branding
70 #BRAND: package should then have proper Requires for features changed
71 #BRAND: with such an override file.
72 # NOTE: gnome_defaults is not an upstream feature, but a SuSE
73 # enhancement, but to conform branding conventions, the package is named
74 # as gio-branding-upstream.
76 %description -n gio-branding-upstream
77 This package provides upstream defaults for settings stored with
78 GSettings and applications used by the MIME system.
82 Requires: %{name} = %{version}
85 # Now require the subpackages too
86 Requires: glib2-tools = %{version}
87 Requires: libgio = %{version}
88 Requires: libglib = %{version}
89 Requires: libgmodule = %{version}
90 Requires: libgobject = %{version}
91 Requires: libgthread = %{version}
92 # Required by gdbus-codegen
94 Provides: glib2-doc = 2.19.6
95 Obsoletes: glib2-doc < 2.19.6
96 Summary: General-Purpose Utility Library -- Development Files
99 GLib is a general-purpose utility library, which provides many useful
100 data types, macros, type conversions, string utilities, file utilities,
101 a main loop abstraction, and so on.
103 This package contains the development files for GLib.
105 %package devel-static
106 Requires: %{name}-devel = %{version}
107 Summary: General-Purpose Utility Library -- Static Libraries
109 %description devel-static
110 GLib is a general-purpose utility library, which provides many useful
111 data types, macros, type conversions, string utilities, file utilities,
112 a main loop abstraction, and so on.
114 This package contains static versions of the GLib libraries.
117 Summary: General-Purpose Utility Library
118 Provides: %{name} = %{version}
119 Obsoletes: %{name} < %{version}
121 %description -n libglib
122 GLib is a general-purpose utility library, which provides many useful
123 data types, macros, type conversions, string utilities, file utilities,
124 a main loop abstraction, and so on.
126 %package -n libgmodule
127 Summary: General-Purpose Utility Library -- Library for Modules
129 %description -n libgmodule
130 GLib is a general-purpose utility library, which provides many useful
131 data types, macros, type conversions, string utilities, file utilities,
132 a main loop abstraction, and so on.
134 The libgmodule library provides a portable way to dynamically load
135 object files (commonly known as 'plug-ins').
138 Summary: General-Purpose Utility Library -- Library for VFS
139 Requires: gio-branding = %{version}
140 # bnc#555605: shared-mime-info is required by libgio to properly detect mime types.
141 Requires: shared-mime-info
142 # bnc#678518: libgio interacts with others by means of dbus-launch
143 #Requires: dbus-1-x11
144 Provides: gio = %{version}
146 %description -n libgio
147 GLib is a general-purpose utility library, which provides many useful
148 data types, macros, type conversions, string utilities, file utilities,
149 a main loop abstraction, and so on.
151 GIO provides a modern, easy-to-use VFS API.
154 %package -n libgthread
155 Summary: General-Purpose Utility Library -- Library for Threads
157 %description -n libgthread
158 GLib is a general-purpose utility library, which provides many useful
159 data types, macros, type conversions, string utilities, file utilities,
160 a main loop abstraction, and so on.
162 The libgthread library provides a portable way to write multi-threaded
165 %package -n libgobject
166 Summary: General-Purpose Utility Library -- Object-Oriented Framework for C
168 %description -n libgobject
169 GLib is a general-purpose utility library, which provides many useful
170 data types, macros, type conversions, string utilities, file utilities,
171 a main loop abstraction, and so on.
173 The GObject library provides an object-oriented framework for C.
176 %setup -q -n %{name}-%{version}
178 cp -a %{S:1} %{S:2} .
179 cp -a %{S:4} gnome_defaults.conf
180 if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then
181 cp -a %{S:7} m4macros/
185 NOCONFIGURE=1 ./autogen.sh
188 %if 0%{?with_systemtap}
196 %{__make} %{?_smp_mflags} V=1
201 %find_lang glib20 %{?no_lang_C}
203 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
204 install -D -m0644 glib2.sh %{buildroot}%{_sysconfdir}/profile.d/zzz-glib2.sh
205 install -D -m0644 glib2.csh %{buildroot}%{_sysconfdir}/profile.d/zzz-glib2.csh
206 install -D -m0644 gnome_defaults.conf %{buildroot}%{_sysconfdir}/gnome_defaults.conf
208 mkdir -p %{buildroot}%{_localstatedir}/cache/gio-2.0 %{buildroot}%{_datadir}/applications
209 touch %{buildroot}%{_localstatedir}/cache/gio-2.0/gnome-defaults.list
210 touch %{buildroot}%{_localstatedir}/cache/gio-2.0/xfce-defaults.list
211 touch %{buildroot}%{_localstatedir}/cache/gio-2.0/lxde-defaults.list
212 ln -s %{_localstatedir}/cache/gio-2.0/gnome-defaults.list %{buildroot}%{_datadir}/applications/defaults.list
213 # gio-querymodules magic
214 %if "%{_lib}" == "lib64"
215 mv %{buildroot}%{_bindir}/gio-querymodules %{buildroot}%{_bindir}/gio-querymodules-64
217 touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache
219 touch %{buildroot}%{_datadir}/glib-2.0/schemas/gschemas.compiled
220 # remove files we don't care about
221 find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
223 mkdir -p %{buildroot}%{_sysconfdir}/rpm
224 cp %{S:6} %{buildroot}%{_sysconfdir}/rpm
228 %post -n libglib -p /sbin/ldconfig
230 %post -n libgobject -p /sbin/ldconfig
232 %post -n libgthread -p /sbin/ldconfig
234 %post -n libgio -p /sbin/ldconfig
236 %post -n libgmodule -p /sbin/ldconfig
238 %postun -n libglib -p /sbin/ldconfig
240 %postun -n libgobject -p /sbin/ldconfig
242 %postun -n libgthread -p /sbin/ldconfig
244 %postun -n libgio -p /sbin/ldconfig
246 %postun -n libgmodule -p /sbin/ldconfig
250 %manifest %{name}.manifest
251 %defattr(-,root,root)
252 %dir %{_datadir}/bash-completion
253 %dir %{_datadir}/bash-completion/completions
254 %{_datadir}/bash-completion/completions/gresource
255 %{_datadir}/bash-completion/completions/gsettings
257 %{_bindir}/gio-querymodules*
258 %{_bindir}/glib-compile-schemas
261 %{_bindir}/gapplication
262 # We put those files here, but they don't really belong here. They just don't
263 # have a better home... The zzz-glib2 scripts could arguably be in
264 # libglib but that would break the shared library policy.
265 %{_sysconfdir}/profile.d/zzz-glib2.*
267 %files -n gio-branding-upstream
268 %manifest %{name}.manifest
269 %defattr(-,root,root)
270 %config (noreplace) %{_sysconfdir}/gnome_defaults.conf
273 %manifest %{name}.manifest
274 %defattr(-, root, root)
276 %{_libdir}/libglib*.so.*
279 %manifest %{name}.manifest
280 %defattr(-, root, root)
281 %{_libdir}/libgmodule*.so.*
284 %manifest %{name}.manifest
285 %defattr(-, root, root)
286 %{_libdir}/libgobject*.so.*
289 %manifest %{name}.manifest
290 %defattr(-, root, root)
291 %{_libdir}/libgthread*.so.*
294 %manifest %{name}.manifest
295 %defattr(-, root, root)
296 %{_libdir}/libgio*.so.*
298 %dir %{_libdir}/gio/modules
299 %ghost %{_libdir}/gio/modules/giomodule.cache
300 %dir %{_datadir}/glib-2.0/
301 %dir %{_datadir}/glib-2.0/schemas/
302 %ghost %{_datadir}/glib-2.0/schemas/gschemas.compiled
303 %{_datadir}/applications/defaults.list
304 %dir %{_localstatedir}/cache/gio-2.0
305 %ghost %{_localstatedir}/cache/gio-2.0/gnome-defaults.list
306 %ghost %{_localstatedir}/cache/gio-2.0/xfce-defaults.list
307 %ghost %{_localstatedir}/cache/gio-2.0/lxde-defaults.list
310 %lang_package -f glib20
314 %manifest %{name}.manifest
315 %defattr(-,root,root)
317 %{_bindir}/gdbus-codegen
318 %{_datadir}/bash-completion/completions/*
319 %_datadir/glib-2.0/codegen
321 %{_bindir}/glib-compile-resources
322 %{_bindir}/glib-genmarshal
323 %{_bindir}/glib-gettextize
324 %{_bindir}/glib-mkenums
325 %{_bindir}/gobject-query
327 %{_bindir}/gtester-report
328 %dir %{_datadir}/aclocal
329 %{_datadir}/aclocal/glib-2.0.m4
330 %{_datadir}/aclocal/glib-gettext.m4
331 %{_datadir}/aclocal/gsettings.m4
332 %dir %{_datadir}/glib-2.0/
333 %{_datadir}/glib-2.0/gdb/
334 %{_datadir}/glib-2.0/gettext/
335 %{_datadir}/glib-2.0/schemas/gschema.dtd
336 %{_includedir}/glib-2.0
337 %{_includedir}/gio-unix-2.0
339 %dir %{_libdir}/glib-2.0/
340 %{_libdir}/glib-2.0/include/
341 %{_libdir}/pkgconfig/*.pc
342 %{_datadir}/gdb/auto-load/%{_libdir}/*-gdb.py
343 %if 0%{?with_systemtap}
344 %{_datadir}/systemtap/tapset/*.stp
346 %{_sysconfdir}/rpm/macros.glib2
347 # Own these directories to not depend on gdb
349 %dir %{_datadir}/gdb/auto-load
350 %dir %{_datadir}/gdb/auto-load%{_prefix}
351 %dir %{_datadir}/gdb/auto-load%{_libdir}
354 %manifest %{name}.manifest
355 %defattr(-,root,root)