summaryrefslogtreecommitdiff
path: root/packaging/glib2.spec
blob: ac4c53d38361cc85845a068f03ecee516159d76d (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
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
%define with_systemtap 0
%define keepstatic 1


Name:           glib2
Version:        2.38.2
Release:        2.2
# 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:          System/Libraries
Url:            http://www.gtk.org/
Source:         glib2-%{version}.tar.bz2
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
BuildRequires: glib2
BuildRequires: autoconf
BuildRequires: libtool
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  gettext
%if 0%{?with_systemtap}
BuildRequires:  systemtap-sdt-devel
%endif
# Needed for gresource
%if 0%{?fedora_version} || 0%{?centos_version}
BuildRequires:  pkgconfig
BuildRequires: libffi-devel
BuildRequires: elfutils-libelf-devel
BuildRequires: glibc-devel
BuildRequires: zlib-devel
%else
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(libelf) >= 0.8.12
BuildRequires:  pkgconfig(libffi)
BuildRequires:  pkgconfig(libpcre)
BuildRequires:  pkgconfig(zlib)
%endif
%if 0%{?fedora_version} || 0%{?centos_version}
BuildRequires: python-devel
BuildRequires: python-libs
%else
BuildRequires: python-base
BuildRequires: python-xml
%endif
%if 0%{?suse_version}
BuildRequires:  fdupes
%endif

%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
Group:          Development/Libraries

%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
Group:          System/Libraries
Requires:       libgio = %{version}
Obsoletes:      %{name}-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}-%{release}
Requires:       glibc-devel
%if 0%{?fedora_version} || 0%{?centos_version}
Requires:       pkgconfig
%else
Requires:       pkg-config
%endif
# Now require the subpackages too
Requires:       %{name}-tools = %{version}-%{release}
Requires:       libgio = %{version}-%{release}
%if 0%{?suse_version}
Requires:       libglib2 = %{version}-%{release}
%endif
Requires:       libgmodule = %{version}-%{release}
Requires:       libgobject = %{version}-%{release}
Requires:       libgthread = %{version}-%{release}
# Required by gdbus-codegen
Requires:       python-devel
Provides:       glib2-doc = 2.19.6
Obsoletes:      glib2-doc < 2.19.6
Summary:        General-Purpose Utility Library -- Development Files
Group:          Development/Libraries

%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 -n glib2-static
Requires:       %{name}-devel = %{version}
Summary:        General-Purpose Utility Library -- Static Libraries
Group:          Development/Libraries

%description -n glib2-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.

%if 0%{?suse_version}
%package -n libglib2
Summary:        General-Purpose Utility Library
Group:          System/Libraries
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n libglib2
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.
%endif

%package -n libgmodule
Summary:        General-Purpose Utility Library -- Library for Modules
Group:          System/Libraries

%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
Group:          System/Libraries
Requires:       gio-branding-upstream = %{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
Group:          System/Libraries

%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
Group:          System/Libraries

%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 glib2-%{version}
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

%{__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
# remove python we don't care about
rm -f %{buildroot}%{_datadir}/glib-2.0/gdb/*.{pyc,pyo}
rm -f %{buildroot}%{_libdir}/gdbus-codegen/*.{pyc,pyo}
# Install rpm macros
mkdir -p %{buildroot}%{_sysconfdir}/rpm
cp %{S:6} %{buildroot}%{_sysconfdir}/rpm

%if 0%{?suse_version}
%fdupes %{buildroot}
%endif

%if 0%{?suse_version}
%post -n libglib2 -p /sbin/ldconfig
%endif

%post -n libgobject -p /sbin/ldconfig

%post -n libgthread -p /sbin/ldconfig

%post -n libgio -p /sbin/ldconfig

%post -n libgmodule -p /sbin/ldconfig

%if 0%{?suse_version}
%postun -n libglib2 -p /sbin/ldconfig
%endif

%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 -f glib20.lang
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%if 0%{?fedora_version} || 0%{?centos_version}
%{_libdir}/libglib-2.0.so.*
%{_libdir}/libgthread-2.0.so.*
%{_libdir}/libgmodule-2.0.so.*
%{_libdir}/libgobject-2.0.so.*
%{_libdir}/libgio-2.0.so.*
%{_datadir}/bash-completion/completions/*
%dir %{_datadir}/glib-2.0
%dir %{_datadir}/glib-2.0/schemas
%dir %{_libdir}/gio
%dir %{_libdir}/gio/modules
%ghost %{_libdir}/gio/modules/giomodule.cache
#%{_libdir}/gio/modules/libgiofam.so
%{_bindir}/gio-querymodules*
%{_bindir}/glib-compile-schemas
%{_bindir}/gsettings
%{_bindir}/gdbus
#%doc %{_mandir}/man1/gio-querymodules.1.gz
#%doc %{_mandir}/man1/glib-compile-schemas.1.gz
#%doc %{_mandir}/man1/gsettings.1.gz
#%doc %{_mandir}/man1/gdbus.1
%endif

%files tools
%defattr(-,root,root)
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/gdbus
%{_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
%defattr(-,root,root)
%config (noreplace) %{_sysconfdir}/gnome_defaults.conf

%if 0%{?suse_version}
%files -n libglib2
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_libdir}/libglib*.so.*
%endif

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

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

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

%files -n libgio
%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

%files devel
%defattr(-,root,root)

%{_bindir}/gdbus-codegen
%_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}
%{_datadir}/gdb/auto-load%{_libdir}/*
#%{_datadir}/glib-2.0/gdb/*.pyo
#%{_datadir}/glib-2.0/gdb/*.pyc

%files -n glib2-static
%defattr(-,root,root)
%{_libdir}/lib*.a

%changelog
* Tue Mar  5 2013 Anas Nashif <anas.nashif@intel.com> 2.35.8@89b88e0
- Remove previous crash fix (TZPC-453)
* Tue Feb 26 2013 Anas Nashif <anas.nashif@intel.com> 2.35.8@8aed25e
- Update to 2.35.8
* Thu Feb  7 2013 Anas Nashif <anas.nashif@intel.com> 2.35.7@c7a2158
- Update to 2.35.7
* Thu Jan 31 2013 @88f28c3
- Update to 2.35.4
* Thu Jan  3 2013 @7fcf93d
- Avoiding SIGSEGV when running gio-querymodules
* Tue Dec 18 2012 Anas Nashif <anas.nashif@intel.com> 2.35.3@28d76f3
- update to 2.35.3
* Sun Dec  9 2012 @9a11327
- package license file
- update to 2.35.2