summaryrefslogtreecommitdiff
path: root/packaging/glib2.spec
blob: 3e9191e23bb5a5f75e438bcc1b5ba92fe970729f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
%define with_systemtap 0
%define keepstatic 1

Name:           glib2
Version:        2.36.4
Release:        0
# FIXME: find out if tapsets should really be in devel package or in main package
Summary:        General-Purpose Utility Library
License:        LGPL-2.1+
Group:          Base/Libraries
Url:            http://www.gtk.org/
Source:         http://download.gnome.org/sources/glib/2.32/%{name}-%{version}.tar.xz
Source1:        glib2.sh
Source2:        glib2.csh
# Not upstream file. Only proposes upstream packages:
Source4:        glib2-upstream-gnome_defaults.conf
Source6:        macros.glib2
# Not depending on gtk-doc shortens bootstrap compilation path.
# Please update this file from the latest gtk-doc package:
Source7:        gtk-doc.m4
Source99:       baselibs.conf
Source1001: 	glib2.manifest
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRequires:  python
BuildRequires:  gettext-tools
# gdbus-codegen is run during the build, so we need python-xml
BuildRequires:  python-xml
%if 0%{?with_systemtap}
BuildRequires:  systemtap-sdt-devel
%endif
# Needed for gresource
BuildRequires:  pkgconfig(libelf) >= 0.8.12
BuildRequires:  pkgconfig(libffi)
BuildRequires:  pkgconfig(libpcre)
BuildRequires:  pkgconfig(zlib)

%description
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

%package tools
Summary:        General-Purpose Utility Library -- Tools

%description tools
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

%package -n gio-branding-upstream
Summary:        Upstream definitions of default settings and applications
Requires:       libgio = %{version}
Provides:       %{name}-branding-upstream = %{version}
Obsoletes:      %{name}-branding-upstream < %{version}
Provides:       gio-branding = %{version}
Conflicts:      otherproviders(gio-branding)
Supplements:    packageand(libgio:branding-upstream)
BuildArch:      noarch
#BRAND: The /etc/gnome_defaults.conf allows to define arbitrary
#BRAND: applications as preferred defaults.
#BRAND: A /usr/share/glib-2.0/schemas/$NAME.gschema.override file can
#BRAND: be used to override the default value for GSettings keys. See
#BRAND: README.Gsettings-overrides for more details. The branding
#BRAND: package should then have proper Requires for features changed
#BRAND: with such an override file.
# NOTE: gnome_defaults is not an upstream feature, but a SuSE
# enhancement, but to conform branding conventions, the package is named
# as gio-branding-upstream.

%description -n gio-branding-upstream
This package provides upstream defaults for settings stored with
GSettings and applications used by the MIME system.

%package devel
#'
Requires:       %{name} = %{version}
Requires:       glibc-devel
Requires:       pkg-config
# Now require the subpackages too
Requires:       glib2-tools = %{version}
Requires:       libgio = %{version}
Requires:       libglib = %{version}
Requires:       libgmodule = %{version}
Requires:       libgobject = %{version}
Requires:       libgthread = %{version}
# Required by gdbus-codegen
Requires:       python-xml
Provides:       glib2-doc = 2.19.6
Obsoletes:      glib2-doc < 2.19.6
Summary:        General-Purpose Utility Library -- Development Files

%description devel
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

This package contains the development files for GLib.

%package devel-static
Requires:       %{name}-devel = %{version}
Summary:        General-Purpose Utility Library -- Static Libraries

%description devel-static
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

This package contains static versions of the GLib libraries.

%package -n libglib
Summary:        General-Purpose Utility Library
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n libglib
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

%package -n libgmodule
Summary:        General-Purpose Utility Library -- Library for Modules

%description -n libgmodule
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

The libgmodule library provides a portable way to dynamically load
object files (commonly known as 'plug-ins').

%package -n libgio
Summary:        General-Purpose Utility Library -- Library for VFS
Requires:       gio-branding = %{version}
# bnc#555605: shared-mime-info is required by libgio to properly detect mime types.
Requires:       shared-mime-info
# bnc#678518: libgio interacts with others by means of dbus-launch
#Requires:       dbus-1-x11
Provides:       gio = %{version}

%description -n libgio
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

GIO provides a modern, easy-to-use VFS API.


%package -n libgthread
Summary:        General-Purpose Utility Library -- Library for Threads

%description -n libgthread
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

The libgthread library provides a portable way to write multi-threaded
software.

%package -n libgobject
Summary:        General-Purpose Utility Library -- Object-Oriented Framework for C

%description -n libgobject
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a main loop abstraction, and so on.

The GObject library provides an object-oriented framework for C.

%prep
%setup -q -n %{name}-%{version}
cp %{SOURCE1001} .
cp -a %{S:1} %{S:2} .
cp -a %{S:4} gnome_defaults.conf
if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then
    cp -a %{S:7} m4macros/
fi

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
    --enable-static \
%if 0%{?with_systemtap}
    --enable-systemtap \
%endif
    --with-pcre=system

%{__make} %{?_smp_mflags} V=1


%install
%make_install
%find_lang glib20 %{?no_lang_C}

mkdir -p %{buildroot}%{_sysconfdir}/profile.d
install -D -m0644 glib2.sh %{buildroot}%{_sysconfdir}/profile.d/zzz-glib2.sh
install -D -m0644 glib2.csh %{buildroot}%{_sysconfdir}/profile.d/zzz-glib2.csh
install -D -m0644 gnome_defaults.conf %{buildroot}%{_sysconfdir}/gnome_defaults.conf
# default apps magic
mkdir -p %{buildroot}%{_localstatedir}/cache/gio-2.0 %{buildroot}%{_datadir}/applications
touch %{buildroot}%{_localstatedir}/cache/gio-2.0/gnome-defaults.list
touch %{buildroot}%{_localstatedir}/cache/gio-2.0/xfce-defaults.list
touch %{buildroot}%{_localstatedir}/cache/gio-2.0/lxde-defaults.list
ln -s %{_localstatedir}/cache/gio-2.0/gnome-defaults.list %{buildroot}%{_datadir}/applications/defaults.list
# gio-querymodules magic
%if "%{_lib}" == "lib64"
mv %{buildroot}%{_bindir}/gio-querymodules %{buildroot}%{_bindir}/gio-querymodules-64
%endif
touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache
# gsettings magic
touch %{buildroot}%{_datadir}/glib-2.0/schemas/gschemas.compiled
# remove files we don't care about
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
# Install rpm macros
mkdir -p %{buildroot}%{_sysconfdir}/rpm
cp %{S:6} %{buildroot}%{_sysconfdir}/rpm
%fdupes %{buildroot}


%post -n libglib -p /sbin/ldconfig

%post -n libgobject -p /sbin/ldconfig

%post -n libgthread -p /sbin/ldconfig

%post -n libgio -p /sbin/ldconfig

%post -n libgmodule -p /sbin/ldconfig

%postun -n libglib -p /sbin/ldconfig

%postun -n libgobject -p /sbin/ldconfig

%postun -n libgthread -p /sbin/ldconfig

%postun -n libgio -p /sbin/ldconfig

%postun -n libgmodule -p /sbin/ldconfig


%files tools
%manifest %{name}.manifest
%defattr(-,root,root)
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/gresource
%{_datadir}/bash-completion/completions/gsettings
%{_bindir}/gdbus
%{_bindir}/gio-querymodules*
%{_bindir}/glib-compile-schemas
%{_bindir}/gresource
%{_bindir}/gsettings
# We put those files here, but they don't really belong here. They just don't
# have a better home... The zzz-glib2 scripts could arguably be in
# libglib but that would break the shared library policy.
%{_sysconfdir}/profile.d/zzz-glib2.*

%files -n gio-branding-upstream
%manifest %{name}.manifest
%defattr(-,root,root)
%config (noreplace) %{_sysconfdir}/gnome_defaults.conf

%files -n libglib
%manifest %{name}.manifest
%defattr(-, root, root)
%license COPYING
%{_libdir}/libglib*.so.*

%files -n libgmodule
%manifest %{name}.manifest
%defattr(-, root, root)
%{_libdir}/libgmodule*.so.*

%files -n libgobject
%manifest %{name}.manifest
%defattr(-, root, root)
%{_libdir}/libgobject*.so.*

%files -n libgthread
%manifest %{name}.manifest
%defattr(-, root, root)
%{_libdir}/libgthread*.so.*

%files -n libgio
%manifest %{name}.manifest
%defattr(-, root, root)
%{_libdir}/libgio*.so.*
%dir %{_libdir}/gio
%dir %{_libdir}/gio/modules
%ghost %{_libdir}/gio/modules/giomodule.cache
%dir %{_datadir}/glib-2.0/
%dir %{_datadir}/glib-2.0/schemas/
%ghost %{_datadir}/glib-2.0/schemas/gschemas.compiled
%{_datadir}/applications/defaults.list
%dir %{_localstatedir}/cache/gio-2.0
%ghost %{_localstatedir}/cache/gio-2.0/gnome-defaults.list
%ghost %{_localstatedir}/cache/gio-2.0/xfce-defaults.list
%ghost %{_localstatedir}/cache/gio-2.0/lxde-defaults.list


%lang_package -f glib20


%files devel
%manifest %{name}.manifest
%defattr(-,root,root)

%{_bindir}/gdbus-codegen
%{_datadir}/bash-completion/completions/*
%_datadir/glib-2.0/codegen

%{_bindir}/glib-compile-resources
%{_bindir}/glib-genmarshal
%{_bindir}/glib-gettextize
%{_bindir}/glib-mkenums
%{_bindir}/gobject-query
%{_bindir}/gtester
%{_bindir}/gtester-report
%dir %{_datadir}/aclocal
%{_datadir}/aclocal/glib-2.0.m4
%{_datadir}/aclocal/glib-gettext.m4
%{_datadir}/aclocal/gsettings.m4
%dir %{_datadir}/glib-2.0/
%{_datadir}/glib-2.0/gdb/
%{_datadir}/glib-2.0/gettext/
%{_datadir}/glib-2.0/schemas/gschema.dtd
%{_includedir}/glib-2.0
%{_includedir}/gio-unix-2.0
%{_libdir}/lib*.so
%dir %{_libdir}/glib-2.0/
%{_libdir}/glib-2.0/include/
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gdb/auto-load/%{_libdir}/*-gdb.py
%if 0%{?with_systemtap}
%{_datadir}/systemtap/tapset/*.stp
%endif
%{_sysconfdir}/rpm/macros.glib2
# Own these directories to not depend on gdb
%dir %{_datadir}/gdb
%dir %{_datadir}/gdb/auto-load
%dir %{_datadir}/gdb/auto-load%{_prefix}
%dir %{_datadir}/gdb/auto-load%{_libdir}

%files devel-static
%manifest %{name}.manifest
%defattr(-,root,root)
%{_libdir}/lib*.a

%changelog