2007-01-05 16:49:44 +01:00
#
2011-01-14 16:18:22 +01:00
# spec file for package gtk2
2007-01-05 16:49:44 +01:00
#
2017-07-13 15:02:55 +02:00
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
2007-01-05 16:49:44 +01:00
#
2008-08-14 00:39:23 +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:44 +01:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2012-02-20 10:10:46 +01:00
2010-10-15 12:46:12 +02:00
# When updating the binary version, do not forget to also update baselibs.conf
%define gtk_binary_version 2.10.0
2007-01-05 16:49:44 +01:00
%define _name gtk+
2017-11-01 19:38:42 +01:00
Name : gtk2
2017-12-27 09:25:54 +01:00
Version : 2.24.31+20171209.61d5c82f5c
2011-12-21 05:12:25 +01:00
Release : 0
2010-02-11 19:13:27 +01:00
# FIXME: when updating to next version, check whether we can remove the workaround for bgo#596977 below (removing -fomit-frame-pointer)
2010-10-15 12:46:12 +02:00
Summary : The GTK+ toolkit library (version 2)
2011-12-21 05:12:25 +01:00
License : LGPL-2.1+
2009-12-08 11:33:41 +01:00
Group : System/Libraries
2011-12-21 05:12:25 +01:00
Url : http://www.gtk.org/
2017-12-27 09:25:54 +01:00
#Source0: http://download.gnome.org/sources/gtk+/2.24/%%{_name}-%%{version}.tar.xz
Source : %{_name}-%{version} .tar.xz
2014-08-07 13:28:24 +02:00
Source2 : README.SUSE
2007-01-05 16:49:44 +01:00
Source3 : gtkrc
2009-12-29 19:02:29 +01:00
Source4 : baselibs.conf
2010-08-27 17:14:50 +02:00
Source5 : macros.gtk2
2017-12-27 09:25:54 +01:00
2013-07-20 21:27:04 +02:00
# PATCH-FIX-OPENSUSE gtk2-GTK_PATH64.patch sbrabec@novell.com - 64-bit dual install. Use GTK_PATH64 environment variable instead of GTK_PATH
2017-12-27 09:25:54 +01:00
Patch0 : gtk2-GTK_PATH64.patch
2008-07-24 22:44:01 +02:00
# PATCH-FEATURE-UPSTREAM bugzilla-129753-gtk+-2.8.9-localize-font-style-name.diff bnc129753 bgo319484 mfabian@novell.com - Translate the font styles in the GUI
2017-12-27 09:25:54 +01:00
Patch1 : bugzilla-129753-gtk+-2.8.9-localize-font-style-name.diff
2008-07-24 22:44:01 +02:00
# PATCH-FIX-UPSTREAM gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.diff bnc130159 bgo319483 federico@novell.com - Load fonts asynchronously in GtkFontSelection to make it appear faster for CJK languages
2017-12-27 09:25:54 +01:00
Patch2 : gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.diff
2009-05-28 00:51:56 +02:00
# PATCH-FIX-OPENSUSE gtk-path-local.patch Search in /usr/local/%{_lib} by default. bnc369696 bgo534474
2017-12-27 09:25:54 +01:00
Patch3 : gtk-path-local.patch
2014-02-11 23:16:03 +01:00
# PATCH-FIX-UPSTREAM gtk2-default-printer.patch bgo#577642 mgorse@suse.com -- Save selected printer as default
2017-12-27 09:25:54 +01:00
Patch4 : gtk2-default-printer.patch
2014-08-05 20:36:30 +02:00
# PATCH-FIX-UPSTREAM gtk2-bgo625202-30-bit-drawables-remain-black.patch bgo#625202 ku.b@gmx.de -- 30-bit drawables remain black
2017-12-27 09:25:54 +01:00
Patch5 : gtk2-bgo625202-30-bit-drawables-remain-black.patch
2015-06-01 16:52:30 +02:00
# PATCH-FIX-UPSTREAM gtk2-bgo743166-remember-printing-authentication.patch bgo#674264 joschibrauchle@gmx.de -- Credentials from gnome-keyring is not used while printing in GTK 2
2017-12-27 09:25:54 +01:00
Patch6 : gtk2-bgo743166-remember-printing-authentication.patch
2017-12-06 09:18:39 +01:00
# PATCH-FEATURE-OPENSUSE gtk2-converter-python3.patch dimstar@opensuse.org -- Use python3 for gtk-build-converter
2017-12-27 09:25:54 +01:00
Patch7 : gtk2-converter-python3.patch
# PATCH-FEATURE-OPENSUSE gtk2-updateiconcache_sort.patch olh@opensuse.org -- Have gtp-update-icon-cache sort the file list before producing a cache
Patch8 : gtk2-updateiconcache_sort.patch
2009-12-08 11:33:41 +01:00
BuildRequires : atk-devel
2012-09-07 20:38:15 +02:00
BuildRequires : cairo-devel
2009-12-08 11:33:41 +01:00
BuildRequires : cups-devel
2011-12-21 05:12:25 +01:00
BuildRequires : fdupes
BuildRequires : gcc-c++
2010-08-09 15:51:52 +02:00
BuildRequires : gdk-pixbuf-devel
2009-12-08 11:33:41 +01:00
BuildRequires : gnome-patch-translation
2009-12-29 19:02:29 +01:00
BuildRequires : gobject-introspection-devel
2017-12-27 09:25:54 +01:00
BuildRequires : gtk-doc
2009-12-08 11:33:41 +01:00
BuildRequires : libjasper-devel
BuildRequires : libtiff-devel
2017-12-27 09:25:54 +01:00
# Needed for patches touching the build system / bootstrapping
BuildRequires : libtool
2012-09-07 20:38:15 +02:00
BuildRequires : pango-devel
2017-11-01 19:38:42 +01:00
BuildRequires : pkgconfig
2012-02-20 10:14:27 +01:00
BuildRequires : pkgconfig(fontconfig)
BuildRequires : pkgconfig(x11)
BuildRequires : pkgconfig(xcomposite)
BuildRequires : pkgconfig(xcursor)
BuildRequires : pkgconfig(xdamage)
2012-02-20 10:10:46 +01:00
BuildRequires : pkgconfig(xext)
2012-02-20 10:14:27 +01:00
BuildRequires : pkgconfig(xfixes)
2012-02-20 10:10:46 +01:00
BuildRequires : pkgconfig(xi)
2012-02-20 10:14:27 +01:00
BuildRequires : pkgconfig(xinerama)
BuildRequires : pkgconfig(xrandr) >= 1.2.99
BuildRequires : pkgconfig(xrender)
2017-12-27 09:25:54 +01:00
%if !0%{?is_opensuse}
BuildRequires : translation-update-upstream
%endif
2010-10-15 12:46:12 +02:00
%description
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
%package -n libgtk-2_0-0
Summary : The GTK+ toolkit library (version 2)
2017-12-27 10:18:32 +01:00
Group : System/Libraries
2010-10-15 12:46:12 +02:00
# While hicolor is not a Requires strictly speaking, we put it as
# such instead of as a Recommends because many applications just
# assume it's there and we need to have a low-level package to
# bring it in.
2009-03-26 17:38:01 +01:00
Requires : hicolor-icon-theme
2017-11-01 19:38:42 +01:00
Requires(post) : %{name} -tools >= 2.24.20
2010-10-15 12:46:12 +02:00
# gtk+ can work without branding/data/translations. Built in defaults will be used then.
2008-03-07 21:59:23 +01:00
Recommends: %{name} -branding
2010-10-15 12:46:12 +02:00
Recommends: %{name} -data = %{version}
# it's nice to have input modules for various locales installed by default
Recommends: %{name} -immodule-amharic = %{version}
Recommends: %{name} -immodule-inuktitut = %{version}
Recommends: %{name} -immodule-thai = %{version}
Recommends: %{name} -immodule-tigrigna = %{version}
Recommends: %{name} -immodule-vietnamese = %{version}
Recommends: %{name} -lang
2008-04-03 00:37:56 +02:00
Recommends: gvfs
2010-10-15 12:46:12 +02:00
# Provide %{name} to make the lang and immodules packages installable
Provides : %{name} = %{version}
2011-04-27 14:06:18 +02:00
Obsoletes : %{name} < %{version}
2010-10-15 12:46:12 +02:00
# gail is part of gtk+ as of 2.13.x
Provides : gail = 1.22.1
Obsoletes : gail < 1.22.1
2009-12-08 11:33:41 +01:00
#
2007-01-05 16:49:44 +01:00
2010-10-15 12:46:12 +02:00
%description -n libgtk-2_0-0
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
2010-10-14 09:47:49 +02:00
2011-12-12 16:46:30 +01:00
%package -n typelib-1_0-Gtk-2_0
2017-12-29 15:53:35 +01:00
Summary : Introspection bindings for the GTK+ toolkit library v2
2011-12-12 16:46:30 +01:00
Group : System/Libraries
%description -n typelib-1_0-Gtk-2_0
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
2011-12-21 05:12:25 +01:00
This package provides the GObject Introspection bindings for GTK+.
2010-10-15 12:46:12 +02:00
%package immodule-amharic
2017-12-29 15:53:35 +01:00
Summary : Amharic input method for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
Requires : %{name} = %{version}
2013-07-20 21:27:04 +02:00
Requires(post) : %{name} -tools >= 2.24.20
Requires(postun) : %{name} -tools >= 2.24.20
2012-09-07 20:38:15 +02:00
Provides : locale(%{name} :am)
2010-10-15 12:46:12 +02:00
%description immodule-amharic
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
This package provides an input method for Amharic.
%package immodule-inuktitut
2017-12-29 15:53:35 +01:00
Summary : Inuktitut input method for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
Requires : %{name} = %{version}
2013-07-20 21:27:04 +02:00
Requires(post) : %{name} -tools >= 2.24.20
Requires(postun) : %{name} -tools >= 2.24.20
2012-09-07 20:38:15 +02:00
Provides : locale(%{name} :iu)
2010-10-15 12:46:12 +02:00
%description immodule-inuktitut
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
2010-10-14 09:47:49 +02:00
2010-10-15 12:46:12 +02:00
This package provides an input method for Inuktitut.
%package immodule-multipress
2017-12-29 15:53:35 +01:00
Summary : Multipress input method for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
Requires : %{name} = %{version}
2013-07-20 21:27:04 +02:00
Requires(post) : %{name} -tools >= 2.24.20
Requires(postun) : %{name} -tools >= 2.24.20
2010-10-15 12:46:12 +02:00
%description immodule-multipress
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
This package provides an input method which allows text entry via the
multi-press method, as on a mobile phone.
%package immodule-thai
2017-12-29 15:53:35 +01:00
Summary : Thai-Lao input method for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
Requires : %{name} = %{version}
2013-07-20 21:27:04 +02:00
Requires(post) : %{name} -tools >= 2.24.20
Requires(postun) : %{name} -tools >= 2.24.20
2012-09-07 20:38:15 +02:00
Provides : locale(%{name} :lo)
Provides : locale(%{name} :th)
2010-10-15 12:46:12 +02:00
%description immodule-thai
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
This package provides an input method for Thai-Lao.
%package immodules-tigrigna
2017-12-29 15:53:35 +01:00
Summary : Tigrigna input methods for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
Requires : %{name} = %{version}
2013-07-20 21:27:04 +02:00
Requires(post) : %{name} -tools >= 2.24.20
Requires(postun) : %{name} -tools >= 2.24.20
2012-09-07 20:38:15 +02:00
Provides : locale(%{name} :ti)
2010-10-15 12:46:12 +02:00
%description immodules-tigrigna
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
This package provides two input methods for Tigrigna.
%package immodule-vietnamese
2017-12-29 15:53:35 +01:00
Summary : Vietnamese input method for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
Requires : %{name} = %{version}
2013-07-20 21:27:04 +02:00
Requires(post) : %{name} -tools >= 2.24.20
Requires(postun) : %{name} -tools >= 2.24.20
2012-09-07 20:38:15 +02:00
Provides : locale(%{name} :vi)
2010-10-15 12:46:12 +02:00
%description immodule-vietnamese
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
This package provides an input method for Vietnamese.
%package immodule-xim
2017-12-29 15:53:35 +01:00
Summary : X input method for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
Requires : %{name} = %{version}
2013-07-20 21:27:04 +02:00
Requires(post) : %{name} -tools >= 2.24.20
Requires(postun) : %{name} -tools >= 2.24.20
2010-10-15 12:46:12 +02:00
Provides : locale(%{name} :ja)
2012-07-16 22:39:35 +02:00
Provides : locale(%{name} :ko)
2010-10-15 12:46:12 +02:00
Provides : locale(%{name} :th)
Provides : locale(%{name} :zh)
%description immodule-xim
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
This package provides an input method based on the X Input Method.
%package tools
2017-12-29 15:53:35 +01:00
Summary : Auxiliary utilities for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
2011-01-07 23:35:02 +01:00
Requires(post) : update-alternatives
Requires(postun) : update-alternatives
2010-10-15 12:46:12 +02:00
%description tools
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
%package data
2017-12-29 15:53:35 +01:00
Summary : Data files for the GTK+ toolkit library v2
2010-10-15 12:46:12 +02:00
Group : System/Libraries
BuildArch : noarch
%description data
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
2007-01-05 16:49:44 +01:00
2008-03-07 21:59:23 +01:00
%package branding-upstream
2017-12-29 15:53:35 +01:00
Summary : Upstream theme configuration for the GTK+ toolkit library v2
2008-03-07 21:59:23 +01:00
Group : System/Libraries
2011-07-06 19:04:31 +02:00
Requires : libgtk-2_0-0 = %{version}
2012-09-07 20:38:15 +02:00
Supplements: packageand(%{name} :branding-upstream)
2017-11-01 19:38:42 +01:00
Conflicts : otherproviders(%{name} -branding)
Provides : %{name} -branding = %{version}
2012-09-07 20:38:15 +02:00
BuildArch : noarch
2011-07-07 11:15:11 +02:00
#BRAND: Provides /etc/gtk-2.0/gtkrc, to define default theme and icon theme.
#BRAND: Do not forget to add proper Requires in branding package if changing
#BRAND: those.
2008-03-07 21:59:23 +01:00
%description branding-upstream
2010-10-15 12:46:12 +02:00
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
2008-03-07 21:59:23 +01:00
2007-01-05 16:49:44 +01:00
%package devel
2017-12-29 15:53:35 +01:00
Summary : Development files for the GTK+ toolkit library v2
2007-01-05 16:49:44 +01:00
Group : Development/Libraries/X11
2010-10-15 12:46:12 +02:00
Requires : libgtk-2_0-0 = %{version}
2008-07-11 21:09:42 +02:00
# gtk-builder-convert needs this.
2017-12-06 09:18:39 +01:00
Requires : python3-xml
2012-09-07 20:32:53 +02:00
Requires : typelib-1_0-Gtk-2_0 = %{version}
2008-06-22 02:36:34 +02:00
# gail is part of gtk+ as of 2.13.x
Provides : gail-devel = 1.22.1
2009-12-08 11:33:41 +01:00
Obsoletes : gail-devel < 1.22.1
2009-02-20 22:11:30 +01:00
Provides : gtk2-doc = %{version}
2009-12-08 11:33:41 +01:00
Obsoletes : gtk2-doc < %{version}
2010-10-15 12:46:12 +02:00
#
2007-01-05 16:49:44 +01:00
%description devel
2010-10-15 12:46:12 +02:00
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
Offering a complete set of widgets, GTK+ is suitable for projects
ranging from small one-off projects to complete application suites.
2007-07-10 18:22:31 +02:00
2010-10-15 12:46:12 +02:00
This package contains the development files for GTK+ 2.x.
2007-01-05 16:49:44 +01:00
2007-08-09 18:33:31 +02:00
%lang_package
2017-11-01 19:38:42 +01:00
2007-01-05 16:49:44 +01:00
%prep
2009-11-25 14:48:22 +01:00
%setup -q -n %{_name}-%{version}
2017-12-27 09:25:54 +01:00
%if !0%{?is_opensuse}
2011-10-15 08:26:02 +02:00
translation-update-upstream
translation-update-upstream po-properties gtk20-properties
2011-10-15 09:06:24 +02:00
# remove incomplete translations caused by translation-update-upstream (global LINGUAS file, two domains)
for LNG in po/*.po ; do
LNG=`basename ${LNG%%.po}`
if ! test -f po-properties/$LNG.po ; then
2011-10-15 08:26:02 +02:00
echo " R e m o v i n g i n c o m p l e t e $ L N G f r o m L I N G U A S . "
2011-10-15 09:06:24 +02:00
sed -i " / ^ $ L N G \ $ / d " po/LINGUAS
2011-10-15 08:26:02 +02:00
fi
done
2017-12-27 09:25:54 +01:00
%endif
2009-11-25 14:48:22 +01:00
gnome-patch-translation-prepare
2012-09-07 20:32:53 +02:00
%if "%{_lib}" == "lib64"
cp -a %{SOURCE2} .
2007-01-05 16:49:44 +01:00
# WARNING: This patch does not patch not installed demos and tests.
2017-12-27 09:25:54 +01:00
%patch0 -p1
2007-01-05 16:49:44 +01:00
%endif
2017-12-27 09:25:54 +01:00
%patch1 -p1
%patch2 -p1
%patch3
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
2009-11-25 14:48:22 +01:00
gnome-patch-translation-update
2007-01-05 16:49:44 +01:00
%build
2017-12-27 09:25:54 +01:00
NOCONFIGURE=1 ./autogen.sh
2012-09-07 20:32:53 +02:00
export CFLAGS=" %{optflags} "
2007-01-05 16:49:44 +01:00
export CFLAGS=" $ C F L A G S - f s t a c k - p r o t e c t o r "
%ifarch ppc64
export CFLAGS=" $ C F L A G S - m m i n i m a l - t o c "
%endif
2009-10-05 22:42:39 +02:00
# fix crash in gdm, nautilus, etc. (bgo#596977)
export CFLAGS=`echo $CFLAGS | sed -e 's/-fomit-frame-pointer//g' `
2009-05-28 00:51:56 +02:00
%configure \
2010-08-09 15:51:52 +02:00
--disable-static \
2010-10-15 12:46:12 +02:00
--enable-man \
--with-xinput=xfree \
2017-12-27 09:25:54 +01:00
--enable-introspection \
--enable-gtk-doc
2011-11-15 15:35:28 +01:00
make %{?_smp_mflags}
2007-01-05 16:49:44 +01:00
%install
2012-09-07 20:32:53 +02:00
%make_install
2017-11-01 19:38:42 +01:00
find %{buildroot} -type f -name " * . l a " -delete -print
2010-12-14 19:25:03 +01:00
%if 0%{?suse_version} <= 1130
2012-09-07 20:32:53 +02:00
rm %{buildroot} %{_datadir} /locale/kg/LC_MESSAGES/*
2010-12-14 19:25:03 +01:00
%endif
2007-01-05 16:49:44 +01:00
%find_lang gtk20
2010-10-15 12:46:12 +02:00
%find_lang gtk20-properties
2012-09-07 20:32:53 +02:00
install -m 644 %{SOURCE3} %{buildroot} %{_sysconfdir} /gtk-2.0
2013-07-20 21:27:04 +02:00
touch %{buildroot} %{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules.cache
2012-09-07 20:32:53 +02:00
%if "%{_lib}" == "lib64"
2010-10-15 12:46:12 +02:00
mv %{buildroot} %{_bindir} /gtk-query-immodules-2.0 %{buildroot} %{_bindir} /gtk-query-immodules-2.0-64
2007-01-05 16:49:44 +01:00
%endif
2016-08-11 18:37:43 +02:00
# Alternatives for gtk-update-icon-cache (binary and manpage)
mkdir -p %{buildroot} %{_sysconfdir} /alternatives
2011-01-07 23:35:02 +01:00
mv %{buildroot} %{_bindir} /gtk-update-icon-cache %{buildroot} %{_bindir} /gtk-update-icon-cache-2.0
2016-08-11 18:37:43 +02:00
ln -s -f %{_sysconfdir} /alternatives/gtk-update-icon-cache %{buildroot} %{_bindir} /gtk-update-icon-cache
2011-01-07 23:35:02 +01:00
mv %{buildroot} %{_mandir} /man1/gtk-update-icon-cache.1 %{buildroot} %{_mandir} /man1/gtk-update-icon-cache-2.0.1
2016-08-11 18:37:43 +02:00
ln -s -f %{_sysconfdir} /alternatives/gtk-update-icon-cache.1%{ext_man} %{buildroot} %{_mandir} /man1/gtk-update-icon-cache.1%{ext_man}
2010-08-27 17:14:50 +02:00
# Install rpm macros
mkdir -p %{buildroot} %{_sysconfdir} /rpm
2012-09-07 20:32:53 +02:00
cp %{SOURCE5} %{buildroot} %{_sysconfdir} /rpm
2010-10-15 12:46:12 +02:00
%fdupes %{buildroot} %{_datadir}
%fdupes %{buildroot} %{_libdir}
2007-08-09 18:33:31 +02:00
2010-10-15 12:46:12 +02:00
###########################################################################
# Note: when updating scriptlets, don't forget to also update baselibs.conf
###########################################################################
# Convenient %define for the scriplets
2012-09-07 20:32:53 +02:00
%if "%{_lib}" == "lib64"
2010-10-15 12:46:12 +02:00
%define _gtk_query_immodules %{_bindir}/gtk-query-immodules-2.0-64
2010-08-27 17:14:50 +02:00
%else
2010-10-15 12:46:12 +02:00
%define _gtk_query_immodules %{_bindir}/gtk-query-immodules-2.0
2010-08-27 17:14:50 +02:00
%endif
2013-07-20 21:27:04 +02:00
%define _gtk_query_immodules_update_cache %{_gtk_query_immodules} --update-cache
2007-01-05 16:49:44 +01:00
2010-10-15 12:46:12 +02:00
%post -n libgtk-2_0-0
/sbin/ldconfig
%if 0
# In case libgtk-2_0-0 gets installed before gtk2-tools, we don't want to fail.
# So we make the call to gtk-query-immodules-2.0 dependent on the existence of
# the binary. This is why we also have a %post for gtk2-tools.
%endif
if test -f %{_gtk_query_immodules}; then
%{_gtk_query_immodules_update_cache}
fi
%post immodule-amharic
%{_gtk_query_immodules_update_cache}
%post immodule-inuktitut
%{_gtk_query_immodules_update_cache}
%post immodule-multipress
%{_gtk_query_immodules_update_cache}
%post immodule-thai
%{_gtk_query_immodules_update_cache}
%post immodules-tigrigna
%{_gtk_query_immodules_update_cache}
%post immodule-vietnamese
%{_gtk_query_immodules_update_cache}
%post immodule-xim
%{_gtk_query_immodules_update_cache}
%post tools
%if 0
# If we install gtk2-tools for the first time, then we should run it in case
# libgtk-2_0-0 was installed first (ie, if
# %{_libdir}/gtk-2.0/%{gtk_binary_version} already exists) which means
# gtk-query-immodules-2.0 couldn't run there.
%endif
2014-11-11 00:15:23 +01:00
if [ $1 = 1 ]; then
2010-10-15 12:46:12 +02:00
test -d %{_libdir} /gtk-2.0/%{gtk_binary_version}
if test $? -eq 0; then
%{_gtk_query_immodules_update_cache}
fi
fi
2011-01-07 23:35:02 +01:00
%if 0
# If the gtk-update-icon-cache group is in automatic mode, then this will also
# switch all symlinks automatically
%endif
update-alternatives --install %{_bindir} /gtk-update-icon-cache gtk-update-icon-cache %{_bindir} /gtk-update-icon-cache-2.0 2 \
--slave %{_mandir} /man1/gtk-update-icon-cache.1.gz gtk-update-icon-cache.1.gz %{_mandir} /man1/gtk-update-icon-cache-2.0.1.gz
2017-07-20 13:38:22 +02:00
%filetriggerin tools -- %{_datadir} /icons
if [ " $ ( r e a l p a t h %{_bindir} / g t k - u p d a t e - i c o n - c a c h e ) " = " %{_bindir} / g t k - u p d a t e - i c o n - c a c h e - 2 . 0 " ]; then
for ICON_THEME in $(cut -d / -f 5 | sort -u); do
if [ -f " %{_datadir} / i c o n s / $ { I C O N _ T H E M E } / i n d e x . t h e m e " ]; then
%{_bindir} /gtk-update-icon-cache --quiet --force " %{_datadir} / i c o n s / $ { I C O N _ T H E M E } "
fi
done
fi
%filetriggerpostun tools -- %{_datadir} /icons
if [ " $ ( r e a l p a t h %{_bindir} / g t k - u p d a t e - i c o n - c a c h e ) " = " %{_bindir} / g t k - u p d a t e - i c o n - c a c h e - 2 . 0 " ]; then
for ICON_THEME in $(cut -d / -f 5 | sort -u); do
if [ -f " %{_datadir} / i c o n s / $ { I C O N _ T H E M E } / i n d e x . t h e m e " ]; then
%{_bindir} /gtk-update-icon-cache --quiet --force " %{_datadir} / i c o n s / $ { I C O N _ T H E M E } "
fi
done
fi
2010-10-15 12:46:12 +02:00
%if 0
# No need to call gtk-query-immodules-2.0 in postun:
# - if it's an upgrade, it will have been called in post
# - if it's an uninstall, we don't care about this anymore
%endif
%postun -n libgtk-2_0-0 -p /sbin/ldconfig
%postun immodule-amharic
%{_gtk_query_immodules_update_cache}
%postun immodule-inuktitut
%{_gtk_query_immodules_update_cache}
2010-10-14 09:47:49 +02:00
2010-10-15 12:46:12 +02:00
%postun immodule-multipress
%{_gtk_query_immodules_update_cache}
%postun immodule-thai
%{_gtk_query_immodules_update_cache}
%postun immodules-tigrigna
%{_gtk_query_immodules_update_cache}
%postun immodule-vietnamese
%{_gtk_query_immodules_update_cache}
%postun immodule-xim
%{_gtk_query_immodules_update_cache}
2011-01-07 23:35:02 +01:00
%postun tools
%if 0
# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed
%endif
if [ ! -f %{_bindir} /gtk-update-icon-cache-2.0 ]; then
update-alternatives --remove gtk-update-icon-cache %{_bindir} /gtk-update-icon-cache-2.0
fi
2010-10-15 12:46:12 +02:00
%files -n libgtk-2_0-0
2014-11-25 18:39:07 +01:00
%doc AUTHORS COPYING README NEWS
2012-09-07 20:32:53 +02:00
%if "%{_lib}" == "lib64"
2014-08-07 13:28:24 +02:00
%doc README.SUSE
2007-01-05 16:49:44 +01:00
%endif
%dir %{_sysconfdir} /gtk-2.0
2010-10-15 12:46:12 +02:00
%dir %{_libdir} /gtk-2.0
%dir %{_libdir} /gtk-2.0/%{gtk_binary_version}
%dir %{_libdir} /gtk-2.0/%{gtk_binary_version} /engines
%{_libdir} /gtk-2.0/%{gtk_binary_version} /engines/libpixmap.so
%dir %{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-cedilla.so
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-cyrillic-translit.so
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-ipa.so
%dir %{_libdir} /gtk-2.0/%{gtk_binary_version} /printbackends
%{_libdir} /gtk-2.0/%{gtk_binary_version} /printbackends/libprintbackend-cups.so
%{_libdir} /gtk-2.0/%{gtk_binary_version} /printbackends/libprintbackend-file.so
%{_libdir} /gtk-2.0/%{gtk_binary_version} /printbackends/libprintbackend-lpr.so
2013-07-20 21:27:04 +02:00
%ghost %{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules.cache
2010-10-15 12:46:12 +02:00
%dir %{_libdir} /gtk-2.0/modules
%{_libdir} /gtk-2.0/modules/libgail.so
%{_libdir} /libgailutil.so.*
%{_libdir} /libgdk-x11-2.0.so.*
%{_libdir} /libgtk-x11-2.0.so.*
2011-12-12 16:46:30 +01:00
%files -n typelib-1_0-Gtk-2_0
2010-10-15 12:46:12 +02:00
%{_libdir} /girepository-1.0/Gdk-2.0.typelib
%{_libdir} /girepository-1.0/GdkX11-2.0.typelib
%{_libdir} /girepository-1.0/Gtk-2.0.typelib
%files immodule-amharic
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-am-et.so
%files immodule-inuktitut
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-inuktitut.so
%files immodule-multipress
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-multipress.so
%config %{_sysconfdir} /gtk-2.0/im-multipress.conf
%files immodule-thai
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-thai.so
%files immodules-tigrigna
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-ti-er.so
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-ti-et.so
%files immodule-vietnamese
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-viqr.so
%files immodule-xim
%{_libdir} /gtk-2.0/%{gtk_binary_version} /immodules/im-xim.so
%files tools
%{_bindir} /gtk-query-immodules-2.0*
2011-01-07 23:35:02 +01:00
%{_bindir} /gtk-update-icon-cache-2.0
2016-08-11 18:37:43 +02:00
%{_bindir} /gtk-update-icon-cache
%ghost %{_sysconfdir} /alternatives/gtk-update-icon-cache
%ghost %{_sysconfdir} /alternatives/gtk-update-icon-cache.1%{?ext_man}
%{_mandir} /man1/gtk-query-immodules-2.0*.1%{?ext_man}
%{_mandir} /man1/gtk-update-icon-cache-2.0.1%{?ext_man}
%{_mandir} /man1/gtk-update-icon-cache.1%{?ext_man}
2010-10-15 12:46:12 +02:00
%files data
%{_datadir} /themes/Default/
%{_datadir} /themes/Emacs/
%{_datadir} /themes/Raleigh/
2007-08-09 18:33:31 +02:00
2008-03-07 21:59:23 +01:00
%files branding-upstream
%config %{_sysconfdir} /gtk-2.0/gtkrc
2010-10-15 12:46:12 +02:00
%files lang -f gtk20.lang -f gtk20-properties.lang
2007-01-05 16:49:44 +01:00
%files devel
2010-10-15 12:46:12 +02:00
%doc %{_datadir} /gtk-doc/html/gail-libgail-util/
2012-12-11 17:48:25 +01:00
%doc %{_datadir} /gtk-doc/html/gdk2/
%doc %{_datadir} /gtk-doc/html/gtk2/
2011-02-13 23:59:04 +01:00
%{_bindir} /gtk-builder-convert
2010-10-15 12:46:12 +02:00
%{_bindir} /gtk-demo
2011-02-13 23:59:04 +01:00
%{_mandir} /man1/gtk-builder-convert.1*
2010-10-15 12:46:12 +02:00
%{_datadir} /aclocal/gtk-2.0.m4
2010-08-09 15:51:52 +02:00
%{_datadir} /gir-1.0/*.gir
%dir %{_datadir} /gtk-2.0
2010-10-15 12:46:12 +02:00
%{_datadir} /gtk-2.0/demo/
%{_includedir} /gail-1.0/
%{_includedir} /gtk-2.0/
%{_includedir} /gtk-unix-print-2.0/
%{_libdir} /gtk-2.0/include/
%{_libdir} /gtk-2.0/modules/libferret.so
2007-01-05 16:49:44 +01:00
%{_libdir} /pkgconfig/*.pc
2010-10-15 12:46:12 +02:00
%{_libdir} /libgailutil.so
%{_libdir} /libgdk-x11-2.0.so
%{_libdir} /libgtk-x11-2.0.so
2010-08-27 17:14:50 +02:00
%{_sysconfdir} /rpm/macros.gtk2
2007-12-14 17:19:17 +01:00
2007-02-19 21:35:11 +01:00
%changelog