Accepting request 50510 from home:vuntz:branches:GNOME:Factory

OBS-URL: https://build.opensuse.org/request/show/50510
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk2?expand=0&rev=126
This commit is contained in:
Vincent Untz 2010-10-14 07:47:49 +00:00 committed by Git OBS Bridge
parent 0f988bc80f
commit b23a836831
4 changed files with 551 additions and 110 deletions

View File

@ -1,6 +1,103 @@
gtk2 gtk2-tools
+/usr/bin/gtk-query-immodules-2.0(-64)? +/usr/bin/gtk-query-immodules-2.0(-64)?
prereq "/usr/bin/touch" post "%if "%_lib" == "lib64""
post "touch var/adm/SuSEconfig/run-gtk" post "if [ $1 == 1 ]; then test -d <prefix>%{_libdir}/gtk-2.0/2.10.0; if test $? -eq 0; then <prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules; fi; fi"
post "%else"
post "if [ $1 == 1 ]; then test -d <prefix>%{_libdir}/gtk-2.0/2.10.0; if test $? -eq 0; then <prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules; fi; fi"
post "%endif"
libgtk-2_0-0
+/etc/gtk-2.0/gtk(64)?.immodules
requires "gtk2-tools-<targettype>"
provides "gtk2-<targettype> = <version>"
obsoletes "gtk2-<targettype> <= <version>"
obsoletes "gail-<targettype> <= 1.22.1" obsoletes "gail-<targettype> <= 1.22.1"
post "%if "%_lib" == "lib64""
post "if test -f <prefix>%{_bindir}/gtk-query-immodules-2.0-64; then <prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules; fi"
post "%else"
post "if test -f <prefix>%{_bindir}/gtk-query-immodules-2.0; then <prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules; fi"
post "%endif"
arch ppc package gtk2-devel arch ppc package gtk2-devel
gtk2-immodule-amharic
requires "gtk2-<targettype>"
post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
post "%else"
post "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
post "%endif"
postun "%if "%_lib" == "lib64""
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
postun "%endif"
gtk2-immodule-inuktitut
requires "gtk2-<targettype>"
post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
post "%else"
post "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
post "%endif"
postun "%if "%_lib" == "lib64""
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
postun "%endif"
gtk2-immodule-multipress
requires "gtk2-<targettype>"
post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
post "%else"
post "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
post "%endif"
postun "%if "%_lib" == "lib64""
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
postun "%endif"
gtk2-immodule-thai
requires "gtk2-<targettype>"
post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
post "%else"
post "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
post "%endif"
postun "%if "%_lib" == "lib64""
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
postun "%endif"
gtk2-immodules-tigrigna
requires "gtk2-<targettype>"
post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
post "%else"
post "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
post "%endif"
postun "%if "%_lib" == "lib64""
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
postun "%endif"
gtk2-immodule-vietnamese
requires "gtk2-<targettype>"
post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
post "%else"
post "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
post "%endif"
postun "%if "%_lib" == "lib64""
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
postun "%endif"
gtk2-immodule-xim
requires "gtk2-<targettype>"
post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
post "%else"
post "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
post "%endif"
postun "%if "%_lib" == "lib64""
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > <prefix>%{_sysconfdir}/gtk-2.0/gtk64.immodules"
postun "%else"
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > <prefix>%{_sysconfdir}/gtk-2.0/gtk.immodules"
postun "%endif"

View File

@ -1,3 +1,71 @@
-------------------------------------------------------------------
Wed Oct 13 20:34:30 CEST 2010 - vuntz@opensuse.org
- Put comments that are in the scriptlets area of the spec file in
"%if 0" statement: if we don't do that, they actually end up in
the scriplets and can even make them fail if the scriptlets were
just "-p /sbin/ldconfig".
-------------------------------------------------------------------
Mon Oct 11 23:41:03 CEST 2010 - vuntz@opensuse.org
- Update packaging to use the shared library packaging policy:
+ Create libgtk-2_0-0, gtk2-tools and gtk2-data subpackages.
+ Add gtk2-tools Requires to libgtk-2_0-0 for the call to
gtk-query-immodules-2.0 in %post.
+ Add gtk-data Recommends to libgtk-2_0-0.
+ Make libgtk-2_0-0 Provides/Obsoletes gtk2.
+ We need %post/%postun scriptlets for libgtk-2_0-0 and
gtk2-tools that call gtk-query-immodules-2.0 when possible.
+ Update baselibs.conf accordingly.
+ Add gtk2-tools Requires(post)/Requires(postun) to all the
immodule subpackages.
- Remove /usr/bin/touch /bin/rm /bin/rmdir PreReq: they're
unneeded.
- Pass --enable-introspection to configure.
- Stop creating useless directories under /usr/lib/gtk-2.0:
2.10.0/filesystems, 2.10.0/modules, engines, immodules.
- Generally speaking, this moves the packaging of gtk2 and gtk3
much closer to each other.
- Update baselibs.conf to remove assumption in the scriptlets of
the generated packages that they are 32bit packages.
- Use <prefix> in baselibs.conf since we use full paths there, and
this is needed for x86 packages that put files in
/emul/ia32-linux.
-------------------------------------------------------------------
Mon Oct 11 13:52:59 CEST 2010 - vuntz@opensuse.org
- Update summaries and descriptions, based on those used in the
gtk3 source package.
- Split input methods in subpackages:
+ Create gtk2-immodule-amharic, gtk2-immodule-inuktitut,
gtk2-immodule-multipress, gtk2-immodule-thai,
gtk2-immodules-tigrigna, gtk2-immodule-vietnamese,
gtk2-immodule-xim subpackages. For the modules that are useful
for specific locales, we use a locale(gtk2:$locale) Provides to
make those packages installed by default when the locale is
used.
+ Add Recommends to libgtk-3_0-0 for gtk2-immodule-amharic,
gtk2-immodule-inuktitut, gtk2-immodule-thai,
gtk2-immodules-tigrigna, gtk2-immodule-vietnamese. This makes
sense since this helps people discover them without having to
look for them.
+ gtk2-immodule-multipress is not useful by default.
+ gtk2-immodule-xim is creating performance issues, so we don't
want it by default.
+ Fix bnc#629995.
- Explicitly list files in file lists, to make it easier to find
potential issues.
- Move relevant man pages from gtk2-devel to gtk2.
- Move the ferret module to the devel package: it's useful for
tests, but not in general.
- Package /etc/gtk-2.0/gtk(64)?.immodules in baselibs.conf too.
- Remove the touch var/adm/SuSEconfig/run-gtk from baselibs.conf.
- Fix %gtk2_immodule_post and %gtk2_immodule_postun macros to
generate the right file: we were missing a % and were using /etc
instead of /etc/gtk-2.0.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 29 02:13:35 UTC 2010 - aj@suse.de Wed Sep 29 02:13:35 UTC 2010 - aj@suse.de

462
gtk2.spec
View File

@ -16,15 +16,19 @@
# #
# When updating the binary version, do not forget to also update baselibs.conf
%define gtk_binary_version 2.10.0
Name: gtk2 Name: gtk2
%define _name gtk+ %define _name gtk+
Version: 2.22.0 Version: 2.22.0
Release: 1 Release: 1
# NOTE: on upgrade to a new upstream version, change the Obsoletes from <= to < (here and in baselibs.conf)
# FIXME: 2.19.3 doesn't compile with parallel build. Check if this is still true for later versions. # FIXME: 2.19.3 doesn't compile with parallel build. Check if this is still true for later versions.
# FIXME: when updating to next version, check whether we can remove the workaround for bgo#596977 below (removing -fomit-frame-pointer) # FIXME: when updating to next version, check whether we can remove the workaround for bgo#596977 below (removing -fomit-frame-pointer)
# FIXME: once https://bugzilla.gnome.org/show_bug.cgi?id=631872 is fixed, distribute README.multipress
License: LGPLv2.1+ License: LGPLv2.1+
Summary: Library for Creation of Graphical User Interfaces (version 2) Summary: The GTK+ toolkit library (version 2)
Url: http://www.gtk.org/ Url: http://www.gtk.org/
Group: System/Libraries Group: System/Libraries
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.12/%{_name}-%{version}.tar.bz2 Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.12/%{_name}-%{version}.tar.bz2
@ -62,68 +66,207 @@ BuildRequires: libjasper-devel
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: pango-devel BuildRequires: pango-devel
BuildRequires: translation-update-upstream BuildRequires: translation-update-upstream
PreReq: /usr/bin/touch /bin/rm /bin/rmdir BuildRoot: %{_tmppath}/%{name}-%{version}-build
Recommends: %{name}-lang
%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
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2)
Group: System/Libraries
Requires(post): %{name}-tools
# 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.
Requires: hicolor-icon-theme Requires: hicolor-icon-theme
# gtk2 can exist without branding. Built in defaults will be used then. # gtk+ can work without branding/data/translations. Built in defaults will be used then.
Recommends: %{name}-branding Recommends: %{name}-branding
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
Recommends: gvfs Recommends: gvfs
# Provide %{name} to make the lang and immodules packages installable
Provides: %{name} = %{version}
# Note: we keep <= (and a rpmlint warning...) until we get a version higher than 2.22.2 (when this provides/obsoletes was introduced)
Obsoletes: %{name} <= %{version}
# gail is part of gtk+ as of 2.13.x
Provides: gail = 1.22.1
Obsoletes: gail < 1.22.1
# bug437293 # bug437293
%ifarch ppc64 %ifarch ppc64
Obsoletes: gtk2-64bit Obsoletes: gtk2-64bit
%endif %endif
# #
# gail is part of gtk+ as of 2.13.x
Provides: gail = 1.22.1
Obsoletes: gail < 1.22.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description -n libgtk-2_0-0
This fast and versatile library is used all over the world for all GTK+ is a multi-platform toolkit for creating graphical user interfaces.
libgnome (GNOME) applications, gimp (The GIMP), and several others. Offering a complete set of widgets, GTK+ is suitable for projects
Originally, version 1 was written for the GIMP and hence has the name ranging from small one-off projects to complete application suites.
GIMP ToolKit. Many people like it because it is small, efficient, and
very configurable.
Most applications which used gtk (GTK1) have since switched to GTK2. %package immodule-amharic
Besides a more flexible API, it provides improved text rendering using License: LGPLv2.1+
pango (Pango) and many other goodies, but GTK+ 2 lacks compatibility Summary: The GTK+ toolkit library (version 2) -- Amharic Input Method
with GTK1, so to switch, programmers have to port applications to it. Group: System/Libraries
Requires: %{name} = %{version}
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
Provides: locale(%{name}:am)
To develop applications with gtk, you need the package gtk2-devel. %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
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2) -- Inuktitut Input Method
Group: System/Libraries
Requires: %{name} = %{version}
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
Provides: locale(%{name}:iu)
%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.
This package provides an input method for Inuktitut.
%package immodule-multipress
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2) -- Multipress Input Method
Group: System/Libraries
Requires: %{name} = %{version}
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
%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
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2) -- Thai-Lao Input Method
Group: System/Libraries
Requires: %{name} = %{version}
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
Provides: locale(%{name}:lo)
Provides: locale(%{name}:th)
%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
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2) -- Tigrigna Input Methods
Group: System/Libraries
Requires: %{name} = %{version}
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
Provides: locale(%{name}:ti)
%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
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2) -- Vietnamese Input Method
Group: System/Libraries
Requires: %{name} = %{version}
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
Provides: locale(%{name}:vi)
%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
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2) -- X Input Method
Group: System/Libraries
Requires: %{name} = %{version}
Requires(post): %{name}-tools
Requires(postun): %{name}-tools
Provides: locale(%{name}:ko)
Provides: locale(%{name}:ja)
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
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2) -- Tools
Group: System/Libraries
%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
License: LGPLv2.1+
Summary: The GTK+ toolkit library (version 2) -- Data Files
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.
%package branding-upstream %package branding-upstream
License: LGPLv2.1+ License: LGPLv2.1+
Summary: Library for Creation of Graphical User Interfaces (version 2) Summary: The GTK+ toolkit library (version 2) -- Branding Files
Group: System/Libraries Group: System/Libraries
Provides: %{name}-branding = %{version} Provides: %{name}-branding = %{version}
Conflicts: otherproviders(%{name}-branding) Conflicts: otherproviders(%{name}-branding)
Supplements: packageand(%{name}:branding-upstream) Supplements: packageand(%{name}:branding-upstream)
%description branding-upstream %description branding-upstream
This fast and versatile library is used all over the world for all GTK+ is a multi-platform toolkit for creating graphical user interfaces.
libgnome (GNOME) applications, gimp (The GIMP), and several others. Offering a complete set of widgets, GTK+ is suitable for projects
Originally, version 1 was written for the GIMP and hence has the name ranging from small one-off projects to complete application suites.
GIMP ToolKit. Many people like it because it is small, efficient, and
very configurable.
Most applications which used gtk (GTK1) have since switched to GTK2.
Besides a more flexible API, it provides improved text rendering using
pango (Pango) and many other goodies, but GTK+ 2 lacks compatibility
with GTK1, so to switch, programmers have to port applications to it.
To develop applications with gtk, you need the package gtk2-devel.
%package devel %package devel
License: LGPLv2.1+ License: LGPLv2.1+
Summary: Development environment for the Gtk2 GUI library Summary: The GTK+ toolkit library (version 2) -- Development Files
Group: Development/Libraries/X11 Group: Development/Libraries/X11
# bug437293 Requires: libgtk-2_0-0 = %{version}
%ifarch ppc64
Obsoletes: gtk2-devel-64bit
%endif
#
Requires: %{name} = %{version} atk-devel cairo-devel gdk-pixbuf-devel glibc-devel glib2-devel pango-devel %(rpm -q --whatprovides XFree86-devel --queryformat '%{NAME}')
# gtk-builder-convert needs this. # gtk-builder-convert needs this.
Requires: pyxml Requires: pyxml
# gail is part of gtk+ as of 2.13.x # gail is part of gtk+ as of 2.13.x
@ -131,20 +274,18 @@ Provides: gail-devel = 1.22.1
Obsoletes: gail-devel < 1.22.1 Obsoletes: gail-devel < 1.22.1
Provides: gtk2-doc = %{version} Provides: gtk2-doc = %{version}
Obsoletes: gtk2-doc < %{version} Obsoletes: gtk2-doc < %{version}
# bug437293
%ifarch ppc64
Obsoletes: gtk2-devel-64bit
%endif
#
%description devel %description devel
This package contains all necessary include files, libraries, GTK+ is a multi-platform toolkit for creating graphical user interfaces.
configuration files and development tools needed to compile and link Offering a complete set of widgets, GTK+ is suitable for projects
applications using the gtk2 library. ranging from small one-off projects to complete application suites.
In addition, it contains a large set of demo applications in source This package contains the development files for GTK+ 2.x.
code and manual pages for the provided Gtk2 development tools.
Gtk2 is a fast and versatile library is used all over the world for all
GNOME applications, the GIMP, and several other applications.
Originally it was written for the GIMP and hence has the name Gimp
ToolKit. Many people like it because it is small, efficient, and very
configurable.
%lang_package %lang_package
%prep %prep
@ -174,90 +315,225 @@ export CFLAGS="$CFLAGS -mminimal-toc"
export CFLAGS=`echo $CFLAGS | sed -e 's/-fomit-frame-pointer//g'` export CFLAGS=`echo $CFLAGS | sed -e 's/-fomit-frame-pointer//g'`
%configure \ %configure \
--disable-static \ --disable-static \
--enable-man \ --enable-man \
--with-xinput=xfree --with-xinput=xfree \
#make %{?jobs:-j%jobs} --enable-introspection
make #%{__make} %{?_smp_mflags}
%{__make}
%install %install
%makeinstall %makeinstall
find %{buildroot}%{_libdir} -name '*.la' -delete -print find %{buildroot}%{_libdir} -name '*.la' -delete -print
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0
touch $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0/gtk.immodules
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/{,2.10.0/}{engines,filesystems,immodules,modules,printbackends}
%find_lang gtk20 %find_lang gtk20
%find_lang gtk20-properties gtk20.lang %find_lang gtk20-properties
install -m 644 %{S:3} %{buildroot}%{_sysconfdir}/gtk-2.0
touch %{buildroot}%{_sysconfdir}/gtk-2.0/gtk.immodules
%if "%_lib" == "lib64" %if "%_lib" == "lib64"
mv $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-2.0 $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-2.0-64 mv %{buildroot}%{_bindir}/gtk-query-immodules-2.0 %{buildroot}%{_bindir}/gtk-query-immodules-2.0-64
mv $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0/gtk.immodules $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0/gtk64.immodules mv %{buildroot}%{_sysconfdir}/gtk-2.0/gtk.immodules %{buildroot}%{_sysconfdir}/gtk-2.0/gtk64.immodules
%endif %endif
# Install rpm macros # Install rpm macros
mkdir -p %{buildroot}%{_sysconfdir}/rpm mkdir -p %{buildroot}%{_sysconfdir}/rpm
cp %{S:5} %{buildroot}%{_sysconfdir}/rpm cp %{S:5} %{buildroot}%{_sysconfdir}/rpm
%fdupes $RPM_BUILD_ROOT %fdupes %{buildroot}%{_datadir}
%fdupes %{buildroot}%{_libdir}
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
%post ###########################################################################
/sbin/ldconfig # Note: when updating scriptlets, don't forget to also update baselibs.conf
###########################################################################
# Convenient %define for the scriplets
%if "%_lib" == "lib64" %if "%_lib" == "lib64"
%{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk64.immodules %define _gtk_query_immodules %{_bindir}/gtk-query-immodules-2.0-64
%define _gtk_query_immodules_update_cache %{_gtk_query_immodules} > %{_sysconfdir}/gtk-2.0/gtk64.immodules
%else %else
%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk.immodules %define _gtk_query_immodules %{_bindir}/gtk-query-immodules-2.0
%define _gtk_query_immodules_update_cache %{_gtk_query_immodules} > %{_sysconfdir}/gtk-2.0/gtk.immodules
%endif %endif
%postun -p /sbin/ldconfig %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
%files %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
if [ $1 == 1 ]; then
test -d %{_libdir}/gtk-2.0/%{gtk_binary_version}
if test $? -eq 0; then
%{_gtk_query_immodules_update_cache}
fi
fi
%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}
%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}
%files -n libgtk-2_0-0
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS COPYING README NEWS ChangeLog %doc AUTHORS COPYING README NEWS ChangeLog
%if "%_lib" == "lib64" %if "%_lib" == "lib64"
%doc README.SuSE %doc README.SuSE
%endif %endif
%{_bindir}/*query*
%{_bindir}/gtk-update-icon-cache
%{_datadir}/themes/*
%{_libdir}/lib*.so.*
%dir %{_libdir}/gtk-2.0
%dir %{_libdir}/gtk-2.0/[2me]*
%{_libdir}/gtk-2.0/modules/*.so
%dir %{_libdir}/gtk-2.0/immodules
%dir %{_libdir}/gtk-2.0/2*/*
%{_libdir}/gtk-2.0/2*/*/*.so
%dir %{_sysconfdir}/gtk-2.0 %dir %{_sysconfdir}/gtk-2.0
%if "%_lib" == "lib64" %if "%_lib" == "lib64"
%ghost %{_sysconfdir}/gtk-2.0/gtk64.immodules %ghost %{_sysconfdir}/gtk-2.0/gtk64.immodules
%else %else
%ghost %{_sysconfdir}/gtk-2.0/gtk.immodules %ghost %{_sysconfdir}/gtk-2.0/gtk.immodules
%endif %endif
%{_sysconfdir}/gtk-2.0/im-multipress.conf %dir %{_libdir}/gtk-2.0
%{_libdir}/girepository-1.0/*.typelib %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
%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.*
%{_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
%defattr(-,root,root)
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-am-et.so
%files immodule-inuktitut
%defattr(-,root,root)
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-inuktitut.so
%files immodule-multipress
%defattr(-,root,root)
# Not in tarball
#%doc modules/input/README.multipress
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-multipress.so
%config %{_sysconfdir}/gtk-2.0/im-multipress.conf
%files immodule-thai
%defattr(-,root,root)
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-thai.so
%files immodules-tigrigna
%defattr(-,root,root)
%{_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
%defattr(-,root,root)
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-viqr.so
%files immodule-xim
%defattr(-,root,root)
%{_libdir}/gtk-2.0/%{gtk_binary_version}/immodules/im-xim.so
%files tools
%defattr(-,root,root)
%{_bindir}/gtk-query-immodules-2.0*
%{_bindir}/gtk-update-icon-cache
%{_mandir}/man1/gtk-query-immodules-2.0*.1*
%{_mandir}/man1/gtk-update-icon-cache.1*
%files data
%defattr(-,root,root)
%{_datadir}/themes/Default/
%{_datadir}/themes/Emacs/
%{_datadir}/themes/Raleigh/
%files branding-upstream %files branding-upstream
%defattr(-,root,root) %defattr(-,root,root)
%config %{_sysconfdir}/gtk-2.0/gtkrc %config %{_sysconfdir}/gtk-2.0/gtkrc
%files lang -f gtk20.lang %files lang -f gtk20.lang -f gtk20-properties.lang
%defattr(-,root,root)
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/gail-libgail-util/
%doc %{_datadir}/gtk-doc/html/gdk/
%doc %{_datadir}/gtk-doc/html/gtk/
%{_bindir}/gtk-builder-convert %{_bindir}/gtk-builder-convert
%{_bindir}/*-demo %{_bindir}/gtk-demo
%doc %{_mandir}/man1/gtk-builder-convert.1*
%{_datadir}/aclocal/gtk-2.0.m4
%{_datadir}/gir-1.0/*.gir %{_datadir}/gir-1.0/*.gir
%dir %{_datadir}/gtk-2.0 %dir %{_datadir}/gtk-2.0
%{_datadir}/gtk-2.0/demo %{_datadir}/gtk-2.0/demo/
%{_datadir}/aclocal/*.m4 %{_includedir}/gail-1.0/
%{_includedir}/gail-1.0 %{_includedir}/gtk-2.0/
%{_includedir}/gtk-2.0 %{_includedir}/gtk-unix-print-2.0/
%{_includedir}/gtk-unix-print-2.0 %{_libdir}/gtk-2.0/include/
%{_libdir}/lib*.so %{_libdir}/gtk-2.0/modules/libferret.so
%{_libdir}/gtk-2.0/include
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%doc %{_mandir}/man*/* %{_libdir}/libgailutil.so
%doc %{_datadir}/gtk-doc/html/* %{_libdir}/libgdk-x11-2.0.so
%{_libdir}/libgtk-x11-2.0.so
%{_sysconfdir}/rpm/macros.gtk2 %{_sysconfdir}/rpm/macros.gtk2
%changelog %changelog

View File

@ -11,25 +11,25 @@
# #
### ###
%gtk2_immodule_requires \ %gtk2_immodule_requires \
Requires(post): gtk2 \ Requires(post): gtk2 \
Requires(postun): gtk2 Requires(postun): gtk2
# On install, update the cache # On install, update the cache
%gtk2_immodule_post \ %gtk2_immodule_post \
%if "%_lib" == "lib64" \ %if "%_lib" == "lib64" \
%{_bindir}/gtk-query-immodules-2.0-64 > {_sysconfdir}/gtk64.immodules \ %{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk-2.0/gtk64.immodules \
%else \ %else \
%{_bindir}/gtk-query-immodules-2.0 > {_sysconfdir}/gtk.immodules \ %{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules \
%endif %endif
# On uninstall, update the cache. Note: we ignore upgrades (already # On uninstall, update the cache. Note: we ignore upgrades (already
# handled in %post of the new package). # handled in %post of the new package).
%gtk2_immodule_postun \ %gtk2_immodule_postun \
if [ $1 -eq 0 ]; then \ if [ $1 -eq 0 ]; then \
%if "%_lib" == "lib64" \ %if "%_lib" == "lib64" \
%{_bindir}/gtk-query-immodules-2.0-64 > {_sysconfdir}/gtk64.immodules \ %{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk-2.0/gtk64.immodules \
%else \ %else \
%{_bindir}/gtk-query-immodules-2.0 > {_sysconfdir}/gtk.immodules \ %{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules \
%endif \ %endif \
fi fi