d80abfc20b
Copy from home:vuntz:branches:GNOME:Factory/glib2 via accept of submit request 44839 revision 3. Request was accepted with message: ok OBS-URL: https://build.opensuse.org/request/show/44839 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/glib2?expand=0&rev=87
426 lines
14 KiB
RPMSpec
426 lines
14 KiB
RPMSpec
#
|
|
# spec file for package glib2 (Version 2.25.13)
|
|
#
|
|
# Copyright (c) 2010 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/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: glib2
|
|
%define _name glib
|
|
Version: 2.25.13
|
|
# FIXME: change zlib-devel to pkgconfig(zlib) once we have a recent enough version of zlib
|
|
# FIXME: remove python BuildRequires once sr#43603 is accepted
|
|
# FIXME: find out if tapsets should really be in devel package or in main package
|
|
Release: 1
|
|
License: LGPLv2.1+
|
|
Summary: A Library with Convenient Functions Written in C
|
|
Url: http://www.gtk.org/
|
|
Group: Development/Libraries/C and C++
|
|
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.14/%{_name}-%{version}.tar.bz2
|
|
Source1: glib2.sh
|
|
Source2: glib2.csh
|
|
Source3: SuSEconfig.glib2
|
|
# Not upsteam file. Only proposes upstream packages:
|
|
Source4: glib2-upstream-gnome_defaults.conf
|
|
Source5: macros.glib2
|
|
# Not depending on gtk-doc shortens bootstrap compilation path.
|
|
# Please update this file from the latest gtk-doc package:
|
|
Source6: gtk-doc.m4
|
|
Source99: baselibs.conf
|
|
# PATCH-FIX-OPENSUSE glib2-bnc379332-desktop-su.patch bnc379332 vuntz@novell.com -- Use X-KDE-SubstituteUID
|
|
Patch8: glib2-bnc379332-desktop-su.patch
|
|
# 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
|
|
BuildRequires: fam-devel
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: libselinux-devel
|
|
BuildRequires: pkg-config
|
|
# Only needed because of missing deps in systemtap-sdt-devel, see sr#43603
|
|
BuildRequires: python
|
|
BuildRequires: systemtap-sdt-devel
|
|
BuildRequires: translation-update-upstream
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: pkgconfig(libpcre)
|
|
# For temporary %%posttrans script only.
|
|
PreReq: coreutils
|
|
PreReq: /bin/sed
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
This library provides convenient functions, such as lists and hashes,
|
|
to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%package tools
|
|
License: LGPLv2.1+
|
|
Summary: A Library with Convenient Functions Written in C -- Tools
|
|
Group: Development/Libraries/C and C++
|
|
|
|
%description tools
|
|
This library provides convenient functions, such as lists and hashes,
|
|
to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%package branding-upstream
|
|
License: LGPLv2.1+
|
|
Summary: Definition of GNOME Default Applications
|
|
Group: Development/Libraries/C and C++
|
|
Provides: %{name}-branding = %{version}
|
|
Conflicts: otherproviders(%{name}-branding)
|
|
Supplements: packageand(%{name}:branding-upstream)
|
|
#BRAND: The /etc/gnome_defaults.conf allows to define arbitrary
|
|
#BRAND: applications as preferred defaults.
|
|
# NOTE: gnome_defaults is not an upstream feature, but a SuSE
|
|
# enhancement, but to conform branding conventions, the package is named
|
|
# as glib2-branding-upstream.
|
|
|
|
%description branding-upstream
|
|
This branding-style package sets default applications in GNOME in
|
|
openSUSE.
|
|
|
|
This is a dumb package, which provides only upstream GNOME packages as
|
|
preferred defaults. You most probably don't want this package. You
|
|
probably want to install distribution default glib2-branding and prefer
|
|
distribution wise GNOME defaults.
|
|
|
|
%package devel
|
|
#'
|
|
License: GPLv2+
|
|
Requires: %{name} = %{version} pkg-config glibc-devel
|
|
# Now require the subpackages too
|
|
Requires: glib2-tools = %{version}
|
|
Requires: libglib-2_0-0 = %{version}
|
|
Requires: libgmodule-2_0-0 = %{version}
|
|
Requires: libgio-2_0-0 = %{version}
|
|
Requires: libgthread-2_0-0 = %{version}
|
|
Requires: libgobject-2_0-0 = %{version}
|
|
Provides: glib2-doc = 2.19.6
|
|
Obsoletes: glib2-doc < 2.19.6
|
|
Summary: Include files and libraries mandatory for development
|
|
Group: Development/Libraries/C and C++
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: glib2-devel-64bit
|
|
%endif
|
|
#
|
|
|
|
%description devel
|
|
This package contains all necessary include files, libraries,
|
|
configuration files and development tools (with manual pages) needed to
|
|
compile and link applications using the glib library.
|
|
|
|
The glib library provides convenient functions, such as lists and
|
|
hashes, to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%package -n libglib-2_0-0
|
|
License: LGPLv2.1+
|
|
Summary: A Library with Convenient Functions Written in C
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{name}-branding = %{version}
|
|
Recommends: %{name}-lang = %{version}
|
|
Provides: %{name} = %{version}
|
|
Obsoletes: %{name} < %{version}
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: glib2-64bit
|
|
%endif
|
|
#
|
|
|
|
%description -n libglib-2_0-0
|
|
This library provides convenient functions, such as lists and hashes,
|
|
to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%package -n libgmodule-2_0-0
|
|
License: LGPLv2.1+
|
|
Summary: A Library with Convenient Functions Written in C
|
|
Group: Development/Libraries/C and C++
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: glib2-64bit
|
|
%endif
|
|
#
|
|
|
|
%description -n libgmodule-2_0-0
|
|
This library provides convenient functions, such as lists and hashes,
|
|
to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%package -n libgio-2_0-0
|
|
License: LGPLv2.1+
|
|
Summary: A Library with Convenient Functions Written in C
|
|
Group: Development/Libraries/C and C++
|
|
# The tools are useful for people having libgio
|
|
Recommends: %{name}-tools
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: glib2-64bit
|
|
%endif
|
|
#
|
|
# Temporarily disable this, pending further discussion
|
|
# Recommends: gvfs
|
|
|
|
%description -n libgio-2_0-0
|
|
This library provides convenient functions, such as lists and hashes,
|
|
to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%package -n libgio-fam
|
|
License: LGPLv2.1+
|
|
Summary: A Library with Convenient Functions Written in C
|
|
Group: Development/Libraries/C and C++
|
|
# 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
|
|
This library provides convenient functions, such as lists and hashes,
|
|
to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%package -n libgthread-2_0-0
|
|
License: LGPLv2.1+
|
|
Summary: A Library with Convenient Functions Written in C
|
|
Group: Development/Libraries/C and C++
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: glib2-64bit
|
|
%endif
|
|
#
|
|
|
|
%description -n libgthread-2_0-0
|
|
This library provides convenient functions, such as lists and hashes,
|
|
to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%package -n libgobject-2_0-0
|
|
License: LGPLv2.1+
|
|
Summary: A Library with Convenient Functions Written in C
|
|
Group: Development/Libraries/C and C++
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: glib2-64bit
|
|
%endif
|
|
#
|
|
|
|
%description -n libgobject-2_0-0
|
|
This library provides convenient functions, such as lists and hashes,
|
|
to a C programmer and is used by Gtk+ and GNOME.
|
|
|
|
%lang_package
|
|
%prep
|
|
%setup -q -n %{_name}-%{version}
|
|
translation-update-upstream
|
|
%patch8
|
|
%patch10 -p1
|
|
%patch11 -p1
|
|
cp -a %{S:1} %{S:2} %{S:3} .
|
|
cp -a %{S:4} gnome_defaults.conf
|
|
if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then
|
|
cp -a %{S:6} m4macros/
|
|
fi
|
|
|
|
%build
|
|
%configure \
|
|
--enable-static \
|
|
--enable-selinux \
|
|
--with-pcre=system \
|
|
--enable-systemtap
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
%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
|
|
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
|
|
install -D -m0644 glib2.sh $RPM_BUILD_ROOT/etc/profile.d/zzz-glib2.sh
|
|
install -D -m0644 glib2.csh $RPM_BUILD_ROOT/etc/profile.d/zzz-glib2.csh
|
|
install -D -m0755 SuSEconfig.glib2 $RPM_BUILD_ROOT/sbin/conf.d/SuSEconfig.glib2
|
|
install -D -m0644 gnome_defaults.conf $RPM_BUILD_ROOT%{_sysconfdir}/gnome_defaults.conf
|
|
# default apps magic
|
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/gio-2.0 $RPM_BUILD_ROOT%{_datadir}/applications
|
|
touch $RPM_BUILD_ROOT%{_localstatedir}/cache/gio-2.0/defaults.list
|
|
ln -s %{_localstatedir}/cache/gio-2.0/defaults.list $RPM_BUILD_ROOT%{_datadir}/applications/defaults.list
|
|
# gio-querymodules magic
|
|
%if "%{_lib}" == "lib64"
|
|
mv $RPM_BUILD_ROOT%{_bindir}/gio-querymodules $RPM_BUILD_ROOT%{_bindir}/gio-querymodules-64
|
|
%endif
|
|
touch $RPM_BUILD_ROOT%{_libdir}/gio/modules/giomodule.cache
|
|
# gsettings magic
|
|
touch $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/gschemas.compiled
|
|
# remove files we don't care about
|
|
rm $RPM_BUILD_ROOT%{_libdir}/gio/modules/libgiofam.*a
|
|
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
# Install rpm macros
|
|
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
|
cp %{S:5} %{buildroot}%{_sysconfdir}/rpm
|
|
%fdupes $RPM_BUILD_ROOT
|
|
|
|
%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 "%{_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 "%{_lib}" == "lib64"
|
|
%{_bindir}/gio-querymodules-64 %{_libdir}/gio/modules
|
|
%else
|
|
%{_bindir}/gio-querymodules %{_libdir}/gio/modules
|
|
%endif
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files tools
|
|
%defattr(-,root,root)
|
|
%{_sysconfdir}/bash_completion.d/gdbus-bash-completion.sh
|
|
%{_sysconfdir}/bash_completion.d/gsettings-bash-completion.sh
|
|
%{_bindir}/gdbus
|
|
%{_bindir}/gio-querymodules*
|
|
%{_bindir}/glib-compile-schemas
|
|
%{_bindir}/gsettings
|
|
%{_mandir}/man1/gdbus.1*
|
|
%{_mandir}/man1/gio-querymodules.1*
|
|
%{_mandir}/man1/glib-compile-schemas.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 branding-upstream
|
|
%defattr(-,root,root)
|
|
%config (noreplace) %{_sysconfdir}/gnome_defaults.conf
|
|
|
|
%files -n libglib-2_0-0
|
|
%defattr(-, root, root)
|
|
%doc AUTHORS COPYING README NEWS ChangeLog
|
|
%{_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)
|
|
%{_bindir}/glib-genmarshal
|
|
%{_bindir}/glib-gettextize
|
|
%{_bindir}/glib-mkenums
|
|
%{_bindir}/gobject-query
|
|
%{_bindir}/gtester
|
|
%{_bindir}/gtester-report
|
|
%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.*
|
|
%{_datadir}/aclocal/*.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
|
|
%{_libdir}/lib*.*a
|
|
%dir %{_libdir}/glib-2.0/
|
|
%{_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
|
|
%{_datadir}/systemtap/tapset/*.stp
|
|
%{_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/%{_prefix}/%{_lib}
|
|
|
|
%changelog
|