cb9b3f92bc
Update to 2.31.22, with zlib change OBS-URL: https://build.opensuse.org/request/show/110295 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/glib2?expand=0&rev=188
495 lines
17 KiB
RPMSpec
495 lines
17 KiB
RPMSpec
#
|
|
# spec file for package glib2
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define with_systemtap 0
|
|
|
|
Name: glib2
|
|
%define _name glib
|
|
Version: 2.31.22
|
|
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: System/Libraries
|
|
Url: http://www.gtk.org/
|
|
Source: http://download.gnome.org/sources/glib/2.31/%{_name}-%{version}.tar.xz
|
|
Source1: glib2.sh
|
|
Source2: glib2.csh
|
|
Source3: SuSEconfig.glib2
|
|
# Not upstream file. Only proposes upstream packages:
|
|
Source4: glib2-upstream-gnome_defaults.conf
|
|
# Some documentation for people writing branding packages, shipped in the branding-upstream package
|
|
Source5: README.Gsettings-overrides
|
|
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
|
|
# PATCH-FEATURE-UPSTREAM glib2-bgo569829-gettext-gkeyfile.patch fate300461 bgo569829 vuntz@novell.com -- Look for translation of desktop entry strings via gettext, part that we share with Ubuntu and try to push upstream
|
|
Patch10: glib2-bgo569829-gettext-gkeyfile.patch
|
|
# PATCH-FEATURE-OPENSUSE glib2-fate300461-gettext-gkeyfile-suse.patch fate300461 vuntz@novell.com -- Look for translation of desktop entry strings via gettext, part that deals with the openSUSE specific infrastructure (with desktop_translations)
|
|
Patch11: glib2-fate300461-gettext-gkeyfile-suse.patch
|
|
# PATCH-FIX-UPSTREAM glib2-force-fam-for-remote-fs.patch bgo#592211 hpj@novell.com -- Try monitoring files on NFS mounts via FAM before falling back to inotify.
|
|
Patch12: glib2-force-fam-for-remote-fs.patch
|
|
BuildRequires: automake
|
|
BuildRequires: fam-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-c++
|
|
# Needed for gresource
|
|
BuildRequires: libelf-devel
|
|
BuildRequires: libselinux-devel
|
|
BuildRequires: pkg-config
|
|
BuildRequires: python-base
|
|
# gdbus-codegen is run during the build, so we need python-xml
|
|
BuildRequires: python-xml
|
|
%if 0%{?with_systemtap}
|
|
# systemtap-sdt-devel on openSUSE 11.3 was missing a Requires: python.
|
|
%if %{?suse_version} <= 1130
|
|
BuildRequires: python
|
|
%endif
|
|
BuildRequires: systemtap-sdt-devel
|
|
%endif
|
|
BuildRequires: translation-update-upstream
|
|
BuildRequires: pkgconfig(libffi)
|
|
BuildRequires: pkgconfig(libpcre)
|
|
BuildRequires: pkgconfig(zlib)
|
|
%if 0%{?BUILD_FROM_VCS}
|
|
# It's important to keep those BuildRequires inside
|
|
# BUILD_FROM_VCS to avoid build loops in Factory
|
|
BuildRequires: git-core
|
|
BuildRequires: gtk-doc
|
|
%endif
|
|
# For temporary %%posttrans script only.
|
|
PreReq: coreutils
|
|
PreReq: /bin/sed
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%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/C and C++
|
|
|
|
%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-2_0-0 = %{version}
|
|
Provides: %{name}-branding-upstream = %{version}
|
|
Obsoletes: %{name}-branding-upstream < %{version}
|
|
Provides: gio-branding = %{version}
|
|
Conflicts: otherproviders(gio-branding)
|
|
Supplements: packageand(libgio-2_0-0: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-2_0-0 = %{version}
|
|
Requires: libglib-2_0-0 = %{version}
|
|
Requires: libgmodule-2_0-0 = %{version}
|
|
Requires: libgobject-2_0-0 = %{version}
|
|
Requires: libgthread-2_0-0 = %{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
|
|
Group: Development/Libraries/C and C++
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: glib2-devel-64bit
|
|
%endif
|
|
#
|
|
|
|
%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
|
|
Group: Development/Libraries/C and C++
|
|
|
|
%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-2_0-0
|
|
Summary: General-Purpose Utility Library
|
|
Group: System/Libraries
|
|
Recommends: %{name}-lang
|
|
Provides: %{name} = %{version}
|
|
Obsoletes: %{name} < %{version}
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: glib2-64bit
|
|
%endif
|
|
#
|
|
|
|
%description -n libglib-2_0-0
|
|
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-2_0-0
|
|
Summary: General-Purpose Utility Library -- Library for Modules
|
|
Group: System/Libraries
|
|
|
|
%description -n libgmodule-2_0-0
|
|
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-2_0-0
|
|
Summary: General-Purpose Utility Library -- Library for VFS
|
|
Group: System/Libraries
|
|
Requires: gio-branding = %{version}
|
|
# bnc#555605: shared-mime-info is required by libgio to properly detect mime types.
|
|
Requires: shared-mime-info
|
|
# The tools are useful for people having libgio
|
|
Recommends: %{name}-tools
|
|
# Needed for branding packages
|
|
Provides: gio = %{version}
|
|
# Temporarily disable this, pending further discussion
|
|
# Recommends: gvfs
|
|
|
|
%description -n libgio-2_0-0
|
|
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 libgio-fam
|
|
Summary: General-Purpose Utility Library -- GIO Module to use FAM
|
|
Group: System/Libraries
|
|
# we need gio-querymodules in %post/%postun
|
|
Requires(post): %{name}-tools
|
|
Requires(postun): %{name}-tools
|
|
Supplements: packageand(libgio-2_0-0:fam)
|
|
|
|
%description -n libgio-fam
|
|
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 packages provides a GIO module to use FAM for file monitoring.
|
|
|
|
%package -n libgthread-2_0-0
|
|
Summary: General-Purpose Utility Library -- Library for Threads
|
|
Group: System/Libraries
|
|
|
|
%description -n libgthread-2_0-0
|
|
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-2_0-0
|
|
Summary: General-Purpose Utility Library -- Object-Oriented Framework for C
|
|
Group: System/Libraries
|
|
|
|
%description -n libgobject-2_0-0
|
|
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.
|
|
|
|
%lang_package
|
|
%prep
|
|
%setup -q -n %{_name}-%{version}
|
|
translation-update-upstream
|
|
%patch10 -p1
|
|
%patch11 -p1
|
|
%patch12 -p1
|
|
cp -a %{S:1} %{S:2} %{S:3} %{S:5} .
|
|
cp -a %{S:4} gnome_defaults.conf
|
|
if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then
|
|
cp -a %{S:7} m4macros/
|
|
fi
|
|
%if 0%{?BUILD_FROM_VCS}
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
%endif
|
|
|
|
%build
|
|
%configure \
|
|
--enable-static \
|
|
--enable-selinux \
|
|
%if 0%{?with_systemtap}
|
|
--enable-systemtap \
|
|
%endif
|
|
--with-pcre=system
|
|
|
|
%{__make} %{?_smp_mflags} V=1
|
|
%if 0%{?BUILD_FROM_VCS}
|
|
%{__make} ChangeLog
|
|
%endif
|
|
|
|
%check
|
|
# make check does not work on x86_64. See http://bugzilla.gnome.org/show_bug.cgi?id=554969
|
|
# %{__make} %{?jobs:-j%jobs} check
|
|
|
|
%install
|
|
%makeinstall
|
|
%if 0%{?suse_version} <= 1120
|
|
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
|
|
%endif
|
|
%find_lang %{_name}20 %{?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 -m0755 SuSEconfig.glib2 %{buildroot}/sbin/conf.d/SuSEconfig.glib2
|
|
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/defaults.list
|
|
ln -s %{_localstatedir}/cache/gio-2.0/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
|
|
rm %{buildroot}%{_libdir}/gio/modules/libgiofam.a
|
|
# Install rpm macros
|
|
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
|
cp %{S:6} %{buildroot}%{_sysconfdir}/rpm
|
|
%fdupes %{buildroot}
|
|
|
|
%posttrans
|
|
# If it is an upgrade and gnome_defaults.conf were edited,
|
|
# move it from its old location. (Upgrade from <= 10.2)
|
|
if test -f etc/opt/gnome/gnome_defaults.conf.rpmsave ; then
|
|
mv etc/gnome_defaults.conf etc/gnome_defaults.conf.rpmnew
|
|
sed "s:etc/opt/gnome:etc:g;s:opt/gnome:usr:g" <etc/opt/gnome/gnome_defaults.conf.rpmsave >etc/gnome_defaults.conf
|
|
fi
|
|
# If it is an upgrade and gnome_defaults.conf were edited,
|
|
# revive it from the RPM backup. (Upgrade from == 10.3)
|
|
if test -f etc/gnome_defaults.conf.rpmsave ; then
|
|
mv etc/gnome_defaults.conf etc/gnome_defaults.conf.rpmnew
|
|
mv etc/gnome_defaults.conf.rpmsave etc/gnome_defaults.conf
|
|
fi
|
|
|
|
%post -n libglib-2_0-0 -p /sbin/ldconfig
|
|
|
|
%post -n libgobject-2_0-0 -p /sbin/ldconfig
|
|
|
|
%post -n libgthread-2_0-0 -p /sbin/ldconfig
|
|
|
|
%post -n libgio-2_0-0 -p /sbin/ldconfig
|
|
|
|
%post -n libgmodule-2_0-0 -p /sbin/ldconfig
|
|
|
|
%post -n libgio-fam
|
|
%if 0
|
|
###############################################################################
|
|
# Note: when updating this scriptlet, don't forget to also update baselibs.conf
|
|
###############################################################################
|
|
%endif
|
|
%if "%{_lib}" == "lib64"
|
|
%{_bindir}/gio-querymodules-64 %{_libdir}/gio/modules
|
|
%else
|
|
%{_bindir}/gio-querymodules %{_libdir}/gio/modules
|
|
%endif
|
|
|
|
%postun -n libglib-2_0-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgobject-2_0-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgthread-2_0-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgio-2_0-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgmodule-2_0-0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgio-fam
|
|
%if 0
|
|
###############################################################################
|
|
# Note: when updating this scriptlet, don't forget to also update baselibs.conf
|
|
###############################################################################
|
|
%endif
|
|
%if "%{_lib}" == "lib64"
|
|
%{_bindir}/gio-querymodules-64 %{_libdir}/gio/modules
|
|
%else
|
|
%{_bindir}/gio-querymodules %{_libdir}/gio/modules
|
|
%endif
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%files tools
|
|
%defattr(-,root,root)
|
|
%{_sysconfdir}/bash_completion.d/gdbus-bash-completion.sh
|
|
%{_sysconfdir}/bash_completion.d/gresource-bash-completion.sh
|
|
%{_sysconfdir}/bash_completion.d/gsettings-bash-completion.sh
|
|
%{_bindir}/gdbus
|
|
%{_bindir}/gio-querymodules*
|
|
%{_bindir}/glib-compile-schemas
|
|
%{_bindir}/gresource
|
|
%{_bindir}/gsettings
|
|
%{_mandir}/man1/gdbus.1*
|
|
%{_mandir}/man1/gio-querymodules.1*
|
|
%{_mandir}/man1/glib-compile-schemas.1*
|
|
%{_mandir}/man1/gresource.1*
|
|
%{_mandir}/man1/gsettings.1*
|
|
# 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-2_0-0 but that would break the shared library policy.
|
|
%{_sysconfdir}/profile.d/zzz-glib2.*
|
|
/sbin/conf.d/SuSEconfig.glib2
|
|
|
|
%files -n gio-branding-upstream
|
|
%defattr(-,root,root)
|
|
%doc README.Gsettings-overrides
|
|
%config (noreplace) %{_sysconfdir}/gnome_defaults.conf
|
|
|
|
%files -n libglib-2_0-0
|
|
%defattr(-, root, root)
|
|
%doc AUTHORS COPYING README NEWS
|
|
%{_libdir}/libglib*.so.*
|
|
|
|
%files -n libgmodule-2_0-0
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libgmodule*.so.*
|
|
|
|
%files -n libgobject-2_0-0
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libgobject*.so.*
|
|
|
|
%files -n libgthread-2_0-0
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libgthread*.so.*
|
|
|
|
%files -n libgio-2_0-0
|
|
%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/defaults.list
|
|
|
|
%files -n libgio-fam
|
|
%defattr(-,root,root)
|
|
%{_libdir}/gio/modules/libgiofam.so
|
|
|
|
%files lang -f %{_name}20.lang
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc ChangeLog
|
|
%{_bindir}/gdbus-codegen
|
|
%{_bindir}/glib-compile-resources
|
|
%{_bindir}/glib-genmarshal
|
|
%{_bindir}/glib-gettextize
|
|
%{_bindir}/glib-mkenums
|
|
%{_bindir}/gobject-query
|
|
%{_bindir}/gtester
|
|
%{_bindir}/gtester-report
|
|
%doc %{_mandir}/man?/gdbus-codegen.*
|
|
%doc %{_mandir}/man?/glib-compile-resources.*
|
|
%doc %{_mandir}/man?/glib-genmarshal.*
|
|
%doc %{_mandir}/man?/glib-gettextize.*
|
|
%doc %{_mandir}/man?/glib-mkenums.*
|
|
%doc %{_mandir}/man?/gobject-query.*
|
|
%doc %{_mandir}/man?/gtester.*
|
|
%doc %{_mandir}/man?/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/
|
|
%dir %{_libdir}/gdbus-2.0/
|
|
%{_libdir}/gdbus-2.0/codegen/
|
|
%{_libdir}/glib-2.0/include/
|
|
%{_libdir}/pkgconfig/*.pc
|
|
%{_datadir}/gtk-doc/html/gio
|
|
%{_datadir}/gtk-doc/html/glib
|
|
%{_datadir}/gtk-doc/html/gobject
|
|
%{_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 gtk-doc while building:
|
|
%dir %{_datadir}/gtk-doc
|
|
%dir %{_datadir}/gtk-doc/html
|
|
# 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
|
|
%defattr(-,root,root)
|
|
%{_libdir}/lib*.a
|
|
|
|
%changelog
|