2007-01-05 16:49:20 +01:00
#
2009-12-08 10:33:59 +01:00
# spec file for package glib2 (Version 2.22.1)
2007-01-05 16:49:20 +01:00
#
2009-02-06 17:03:35 +01:00
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
2007-01-05 16:49:20 +01:00
#
2008-08-13 23:29:18 +02:00
# 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.
2007-01-05 16:49:20 +01:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
2008-02-22 01:22:03 +01:00
2007-01-05 16:49:20 +01:00
Name : glib2
%define _name glib
2009-12-08 10:33:59 +01:00
BuildRequires : fam-devel
BuildRequires : fdupes
BuildRequires : gcc-c++
BuildRequires : pcre-devel
BuildRequires : pkg-config
BuildRequires : translation-update-upstream
%if %suse_version > 1100
BuildRequires : libselinux-devel
%endif
2009-12-03 02:49:44 +01:00
License : LGPL v2.1 or later
2009-12-08 10:33:59 +01:00
Group : Development/Libraries/C and C++
AutoReqProv : on
# bug437293
%ifarch ppc64
Obsoletes : glib2-64bit
%endif
#
Version : 2.22.1
Release : 2
2007-01-05 16:49:20 +01:00
Summary : A Library with Convenient Functions Written in C
2007-09-19 18:55:37 +02:00
Url : http://www.gtk.org/
Source : ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.14/%{_name}-%{version} .tar.bz2
2007-01-05 16:49:20 +01:00
Source1 : glib2.sh
Source2 : glib2.csh
2008-04-02 19:05:41 +02:00
Source3 : SuSEconfig.glib2
2008-04-09 21:41:41 +02:00
# Not upsteam file. Only proposes upstream packages:
Source4 : glib2-upstream-gnome_defaults.conf
2007-08-09 17:34:29 +02:00
# Not depending on gtk-doc shortens bootstrap compilation path.
2007-11-29 22:04:32 +01:00
# Please update this file from the latest gtk-doc package:
2008-04-02 19:05:41 +02:00
Source5 : gtk-doc.m4
2009-12-08 10:33:59 +01:00
# PATCH-FIX-OPENSUSE glib2-mkinstalldirs.patch
Patch0 : glib2-mkinstalldirs.patch
# PATCH-FIX-OPENSUSE glib2-aclocal.patch
Patch1 : glib2-aclocal.patch
2008-05-01 14:15:48 +02:00
# PATCH-FIX-OPENSUSE glib2-bnc379332-desktop-su.patch bnc379332 vuntz@novell.com -- Use X-KDE-SubstituteUID
Patch8 : glib2-bnc379332-desktop-su.patch
2009-02-06 17:03:35 +01:00
# 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
2009-12-08 10:33:59 +01:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
Requires : %{name} -lang = %{version}
2007-01-26 17:40:49 +01:00
# For temporary %%pre script only.
PreReq : coreutils
2008-04-06 05:42:23 +02:00
PreReq : /bin/sed
# Conflicts with gnome_defaults.conf from gnome-vfs2 in 10.3
2008-04-02 19:05:41 +02:00
Conflicts : gnome-vfs2 < 2.22.0
2009-12-08 10:33:59 +01:00
Requires : %{name} -branding
Obsoletes : glib2-doc <= 2.19.6
2009-02-17 17:04:27 +01:00
Provides : glib2-doc = 2.19.6
2007-01-05 16:49:20 +01:00
%description
This library provides convenient functions, such as lists and hashes,
to a C programmer and is used by Gtk+ and GNOME.
2008-04-09 21:41:41 +02:00
%package branding-upstream
License : LGPL v2.1 or later
Summary : Definition of GNOME Default Applications
Group : Development/Libraries/C and C++
Provides : %{name} -branding = %{version}
2008-10-22 17:56:11 +02:00
Conflicts : otherproviders(%{name} -branding)
2009-02-06 17:03:35 +01:00
Supplements: packageand(%{name} :branding-upstream)
2008-04-09 21:41:41 +02:00
#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.
2007-01-05 16:49:20 +01:00
%package devel
2008-04-20 14:47:11 +02:00
#'
2008-04-02 19:05:41 +02:00
License : GPL v2 or later
2008-08-26 01:56:52 +02:00
Requires : %{name} = %{version} pkg-config glibc-devel
2008-04-06 05:42:23 +02:00
# Now require the subpackages too
2008-08-21 17:54:30 +02:00
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}
2007-08-30 22:49:40 +02:00
Summary : Include files and libraries mandatory for development
2007-01-05 16:49:20 +01:00
Group : Development/Libraries/C and C++
2009-12-08 10:33:59 +01:00
AutoReqProv : on
2008-11-28 14:40:37 +01:00
# bug437293
%ifarch ppc64
Obsoletes : glib2-devel-64bit
%endif
#
2007-01-05 16:49:20 +01:00
%description devel
2007-07-10 17:59:52 +02:00
This package contains all necessary include files, libraries,
configuration files and development tools (with manual pages) needed to
2007-08-30 22:49:40 +02:00
compile and link applications using the glib library.
2007-07-10 17:59:52 +02:00
2007-08-30 22:49:40 +02:00
The glib library provides convenient functions, such as lists and
2007-07-10 17:59:52 +02:00
hashes, to a C programmer and is used by Gtk+ and GNOME.
2007-01-05 16:49:20 +01:00
2008-04-06 05:42:23 +02:00
%package -n libglib-2_0-0
License : LGPL v2.1 or later
Summary : A Library with Convenient Functions Written in C
Group : Development/Libraries/C and C++
Requires : %{name} = %{version}
2008-11-28 14:40:37 +01:00
# bug437293
%ifarch ppc64
Obsoletes : glib2-64bit
%endif
#
2008-04-06 05:42:23 +02:00
%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 : LGPL v2.1 or later
Summary : A Library with Convenient Functions Written in C
Group : Development/Libraries/C and C++
Requires : %{name} = %{version}
2008-11-28 14:40:37 +01:00
# bug437293
%ifarch ppc64
Obsoletes : glib2-64bit
%endif
#
2008-04-06 05:42:23 +02:00
%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 : LGPL v2.1 or later
Summary : A Library with Convenient Functions Written in C
Group : Development/Libraries/C and C++
Requires : %{name} = %{version}
2008-11-28 14:40:37 +01:00
# bug437293
%ifarch ppc64
Obsoletes : glib2-64bit
%endif
#
2008-04-06 05:42:23 +02:00
# 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.
2008-04-09 21:41:41 +02:00
%package -n libgio-fam
License : LGPL v2.1 or later
Summary : A Library with Convenient Functions Written in C
Group : Development/Libraries/C and C++
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.
2008-04-06 05:42:23 +02:00
%package -n libgthread-2_0-0
License : LGPL v2.1 or later
Summary : A Library with Convenient Functions Written in C
Group : Development/Libraries/C and C++
Requires : %{name} = %{version}
2008-11-28 14:40:37 +01:00
# bug437293
%ifarch ppc64
Obsoletes : glib2-64bit
%endif
#
2008-04-06 05:42:23 +02:00
%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 : LGPL v2.1 or later
Summary : A Library with Convenient Functions Written in C
Group : Development/Libraries/C and C++
Requires : %{name} = %{version}
2008-11-28 14:40:37 +01:00
# bug437293
%ifarch ppc64
Obsoletes : glib2-64bit
%endif
#
2008-04-06 05:42:23 +02:00
%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.
2007-08-09 15:25:12 +02:00
%lang_package
2007-01-05 16:49:20 +01:00
%prep
%setup -q -n %{_name}-%{version}
2009-11-24 21:54:56 +01:00
translation-update-upstream
2009-12-08 10:33:59 +01:00
%patch0
%patch1
2008-05-01 14:15:48 +02:00
%patch8
2009-02-06 17:03:35 +01:00
%patch10 -p1
%patch11 -p1
2008-04-09 21:41:41 +02:00
cp -a %{S:1} %{S:2} %{S:3} .
cp -a %{S:4} gnome_defaults.conf
2007-08-09 17:34:29 +02:00
if ! test -f %{_datadir} /aclocal/gtk-doc.m4 ; then
2008-04-02 19:05:41 +02:00
cp -a %{S:5} m4macros/
2007-08-09 17:34:29 +02:00
fi
2007-01-05 16:49:20 +01:00
%build
2009-12-08 10:33:59 +01:00
autoreconf -fiv
2007-04-13 01:17:44 +02:00
%configure \
2007-11-29 22:04:32 +01:00
--enable-static \
2008-10-24 16:56:56 +02:00
%if %suse_version > 1100
2008-08-22 19:45:52 +02:00
--enable-selinux \
2008-10-24 16:56:56 +02:00
%endif
2007-11-29 22:04:32 +01:00
--with-pcre=system
2008-07-21 00:27:14 +02:00
%{__make} %{?jobs:-j%jobs}
%check
2009-02-06 17:03:35 +01:00
# make check does not work on x86_64. See http://bugzilla.gnome.org/show_bug.cgi?id=554969
# %{__make} %{?jobs:-j%jobs} check
2007-01-05 16:49:20 +01:00
%install
2009-03-11 16:36:39 +01:00
%makeinstall
2007-01-05 16:49:20 +01:00
mkdir -p $RPM_BUILD_ROOT /etc/profile.d
2009-02-06 17:03:35 +01:00
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
2008-04-02 19:05:41 +02:00
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
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
2008-04-06 05:42:23 +02:00
chmod +x $RPM_BUILD_ROOT /%{_bindir} /gtester-report
2008-04-09 21:41:41 +02:00
rm $RPM_BUILD_ROOT %{_libdir} /gio/modules/libgiofam.*a
2009-02-12 17:40:26 +01:00
# We do not need the la files for 11.1 and newer
%if %suse_version > 1100
2008-08-26 01:56:52 +02:00
rm $RPM_BUILD_ROOT %{_libdir} /*.la
2009-02-12 17:40:26 +01:00
%endif
2007-01-05 16:49:20 +01:00
%find_lang %{_name}20
2007-08-09 15:25:12 +02:00
%fdupes $RPM_BUILD_ROOT
2009-07-31 19:21:51 +02:00
2008-04-02 19:05:41 +02:00
%posttrans
# If it is an upgrade and gnome_defaults.conf were edited,
2008-04-06 05:42:23 +02:00
# move it from its old location. (Upgrade from <= 10.2)
2008-04-02 19:05:41 +02:00
if test -f etc/opt/gnome/gnome_defaults.conf.rpmsave ; then
mv etc/gnome_defaults.conf etc/gnome_defaults.conf.rpmnew
sed " s : e t c / o p t / g n o m e : e t c : g ; s : o p t / g n o m e : u s r : g " <etc/opt/gnome/gnome_defaults.conf.rpmsave >etc/gnome_defaults.conf
fi
# If it is an upgrade and gnome_defaults.conf were edited,
2008-04-06 05:42:23 +02:00
# revive it from the RPM backup. (Upgrade from == 10.3)
2008-04-02 19:05:41 +02:00
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
2007-01-05 16:49:20 +01:00
2008-04-06 05:42:23 +02:00
%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
%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
2007-01-05 16:49:20 +01:00
%clean
rm -rf $RPM_BUILD_ROOT
2007-08-09 15:25:12 +02:00
%files
2007-01-05 16:49:20 +01:00
%defattr (-,root,root)
%doc AUTHORS COPYING README NEWS ChangeLog
2008-04-02 19:05:41 +02:00
%{_datadir} /applications/defaults.list
2007-01-05 16:49:20 +01:00
/etc/profile.d/zzz-glib2.*
2008-04-02 19:05:41 +02:00
/sbin/conf.d/SuSEconfig.glib2
2008-04-09 21:41:41 +02:00
%dir %{_libdir} /gio
%dir %{_libdir} /gio/modules
%files branding-upstream
%defattr (-,root,root)
2008-04-06 05:42:23 +02:00
%config (noreplace) %{_sysconfdir} /gnome_defaults.conf
%files -n libglib-2_0-0
%defattr (-, root, root)
%{_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.*
2008-04-02 19:05:41 +02:00
%dir %{_localstatedir} /cache/gio-2.0
%ghost %{_localstatedir} /cache/gio-2.0/defaults.list
2007-01-05 16:49:20 +01:00
2008-04-09 21:41:41 +02:00
%files -n libgio-fam
%defattr (-,root,root)
%{_libdir} /gio/modules/libgiofam.so
2007-08-09 15:25:12 +02:00
%files lang -f %{_name}20.lang
2007-01-05 16:49:20 +01:00
%files devel
%defattr (-,root,root)
%{_bindir} /*
2008-04-02 19:05:41 +02:00
%{_datadir} /aclocal/*.m4
2007-01-05 16:49:20 +01:00
%{_datadir} /glib-2.0
%{_includedir} /glib-2.0
2008-01-23 20:59:47 +01:00
%{_includedir} /gio-unix-2.0
2007-01-05 16:49:20 +01:00
%{_libdir} /lib*.so
%{_libdir} /lib*.*a
%{_libdir} /glib-2.0
%{_libdir} /pkgconfig/*.pc
%doc %{_mandir} /man*/*
2008-01-23 20:59:47 +01:00
%{_datadir} /gtk-doc/html/gio
2007-01-05 16:49:20 +01:00
%{_datadir} /gtk-doc/html/glib
%{_datadir} /gtk-doc/html/gobject
2009-10-05 22:26:56 +02:00
%{_datadir} /gdb/auto-load/%{_libdir} /*-gdb.py
# Own these directories to not depend on gtk-doc while building:
2007-08-09 17:34:29 +02:00
%dir %{_datadir} /gtk-doc
%dir %{_datadir} /gtk-doc/html
2009-10-05 22:26:56 +02:00
# 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}
2007-11-29 22:04:32 +01:00
2007-02-19 21:31:30 +01:00
%changelog