Updating link to change in openSUSE:Factory/gtk2 revision 91.0
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk2?expand=0&rev=3d63d9b75912bff64b13cc0fb21c4652
This commit is contained in:
parent
ee3fa10657
commit
bb7557ac62
@ -1,67 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 2002 SuSE Gmbh Nuernberg, Germany. All rights reserved.
|
||||
#
|
||||
# Author: Holger Hetterich <hhetter@suse.de>, 2002
|
||||
#
|
||||
# SuSEconfig.gtk: this script will generate a /etc/gtk-2.0/gtk.immodules file
|
||||
# based on the gtk-2.0 modules installed on the system
|
||||
#
|
||||
#
|
||||
# check if we are started as root
|
||||
# only one of UID and USER must be set correctly
|
||||
|
||||
if test "$UID" != 0 -a "$USER" != root; then
|
||||
echo "You must be root to start $0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test -n "$ROOT" && exit 0
|
||||
|
||||
# do we need to check for loaders? only on RPM Update or new installation
|
||||
if test -f /var/adm/SuSEconfig/run-gtk ; then
|
||||
|
||||
test -d /etc/gtk-2.0 || mkdir /etc/gtk-2.0
|
||||
|
||||
if [ -x $r/usr/bin/gtk-query-immodules-2.0 ] ; then
|
||||
/usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
|
||||
fi
|
||||
|
||||
if [ -x $r/usr/bin/gtk-query-immodules-2.0-64 ] ; then
|
||||
/usr/bin/gtk-query-immodules-2.0-64 > /etc/gtk-2.0/gtk64.immodules
|
||||
fi
|
||||
|
||||
rm /var/adm/SuSEconfig/run-gtk
|
||||
|
||||
fi
|
||||
|
||||
# Remove all old icon cache files to prevent keeping of empty
|
||||
# directories with icon-theme.cache after removing themes.
|
||||
if test -f $r/var/cache/gtk-2.0/icon-theme.cache-list ; then
|
||||
for DIR in $(<$r/var/cache/gtk-2.0/icon-theme.cache-list) ; do
|
||||
if test $(ls -1 "$DIR" | wc --lines) -le 1 -a -f $DIR/icon-theme.cache; then
|
||||
rm -f $DIR/icon-theme.cache
|
||||
rmdir --ignore-fail-on-non-empty "$DIR"
|
||||
fi
|
||||
done
|
||||
rm /var/cache/gtk-2.0/icon-theme.cache-list
|
||||
fi
|
||||
# Update icon cache.
|
||||
(
|
||||
# Ensure, that $XDG_DATA_DIRS is set properly. (#71978, #240603)
|
||||
if test "$PROFILEREAD" != true ; then
|
||||
. $r/etc/profile
|
||||
fi
|
||||
IFS="$IFS:"
|
||||
for DIR in ${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} ; do
|
||||
for SUBDIR in $DIR/icons/* ; do
|
||||
if test ! -L "$SUBDIR" -a -d "$SUBDIR" ; then
|
||||
/usr/bin/gtk-update-icon-cache --quiet --ignore-theme-index "$SUBDIR"
|
||||
if test -f $SUBDIR/icon-theme.cache ; then
|
||||
echo $SUBDIR >>$r/var/cache/gtk-2.0/icon-theme.cache-list
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
)
|
||||
|
||||
exit 0
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6b8927e4906deea9a848445ea42a3fb4eb8767b410711e0bf826698cd11ab51b
|
||||
size 18053371
|
3
gtk+-2.21.6.tar.bz2
Normal file
3
gtk+-2.21.6.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8b04df957bed1621fbc09976e4fab38cfe68011825d481070db825adc7ba6467
|
||||
size 18071323
|
140
gtk2-testdnd.patch
Normal file
140
gtk2-testdnd.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From 36f931f292cf05bb5c82b3381f134f214b44657e Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Otte <otte@redhat.com>
|
||||
Date: Fri, 06 Aug 2010 18:33:57 +0000
|
||||
Subject: testdnd: Convert to use pixbufs as icons
|
||||
|
||||
Using Pixmaps is outdated.
|
||||
---
|
||||
diff --git a/tests/testdnd.c b/tests/testdnd.c
|
||||
index 2ed5803..0e59364 100644
|
||||
--- a/tests/testdnd.c
|
||||
+++ b/tests/testdnd.c
|
||||
@@ -24,7 +24,7 @@
|
||||
/* Target side drag signals */
|
||||
|
||||
/* XPM */
|
||||
-static char * drag_icon_xpm[] = {
|
||||
+static const char * drag_icon_xpm[] = {
|
||||
"36 48 9 1",
|
||||
" c None",
|
||||
". c #020204",
|
||||
@@ -85,7 +85,7 @@ static char * drag_icon_xpm[] = {
|
||||
"...................................."};
|
||||
|
||||
/* XPM */
|
||||
-static char * trashcan_closed_xpm[] = {
|
||||
+static const char * trashcan_closed_xpm[] = {
|
||||
"64 80 17 1",
|
||||
" c None",
|
||||
". c #030304",
|
||||
@@ -186,7 +186,7 @@ static char * trashcan_closed_xpm[] = {
|
||||
" "};
|
||||
|
||||
/* XPM */
|
||||
-static char * trashcan_open_xpm[] = {
|
||||
+static const char * trashcan_open_xpm[] = {
|
||||
"64 80 17 1",
|
||||
" c None",
|
||||
". c #030304",
|
||||
@@ -286,10 +286,8 @@ static char * trashcan_open_xpm[] = {
|
||||
" ",
|
||||
" "};
|
||||
|
||||
-GdkPixmap *trashcan_open;
|
||||
-GdkPixmap *trashcan_open_mask;
|
||||
-GdkPixmap *trashcan_closed;
|
||||
-GdkPixmap *trashcan_closed_mask;
|
||||
+GdkPixbuf *trashcan_open;
|
||||
+GdkPixbuf *trashcan_closed;
|
||||
|
||||
gboolean have_drag;
|
||||
|
||||
@@ -313,8 +311,7 @@ target_drag_leave (GtkWidget *widget,
|
||||
{
|
||||
g_print("leave\n");
|
||||
have_drag = FALSE;
|
||||
- gtk_image_set_from_pixmap (GTK_IMAGE (widget),
|
||||
- trashcan_closed, trashcan_closed_mask);
|
||||
+ gtk_image_set_from_pixbuf (GTK_IMAGE (widget), trashcan_closed);
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -330,8 +327,7 @@ target_drag_motion (GtkWidget *widget,
|
||||
if (!have_drag)
|
||||
{
|
||||
have_drag = TRUE;
|
||||
- gtk_image_set_from_pixmap (GTK_IMAGE (widget),
|
||||
- trashcan_open, trashcan_open_mask);
|
||||
+ gtk_image_set_from_pixbuf (GTK_IMAGE (widget), trashcan_open);
|
||||
}
|
||||
|
||||
source_widget = gtk_drag_get_source_widget (context);
|
||||
@@ -363,8 +359,7 @@ target_drag_drop (GtkWidget *widget,
|
||||
g_print("drop\n");
|
||||
have_drag = FALSE;
|
||||
|
||||
- gtk_image_set_from_pixmap (GTK_IMAGE (widget),
|
||||
- trashcan_closed, trashcan_closed_mask);
|
||||
+ gtk_image_set_from_pixbuf (GTK_IMAGE (widget), trashcan_closed);
|
||||
|
||||
if (context->targets)
|
||||
{
|
||||
@@ -594,8 +589,7 @@ main (int argc, char **argv)
|
||||
GtkWidget *label;
|
||||
GtkWidget *pixmap;
|
||||
GtkWidget *button;
|
||||
- GdkPixmap *drag_icon;
|
||||
- GdkPixmap *drag_mask;
|
||||
+ GdkPixbuf *drag_icon;
|
||||
|
||||
test_init ();
|
||||
|
||||
@@ -609,19 +603,9 @@ main (int argc, char **argv)
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
- drag_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL,
|
||||
- gtk_widget_get_colormap (window),
|
||||
- &drag_mask,
|
||||
- NULL, drag_icon_xpm);
|
||||
-
|
||||
- trashcan_open = gdk_pixmap_colormap_create_from_xpm_d (NULL,
|
||||
- gtk_widget_get_colormap (window),
|
||||
- &trashcan_open_mask,
|
||||
- NULL, trashcan_open_xpm);
|
||||
- trashcan_closed = gdk_pixmap_colormap_create_from_xpm_d (NULL,
|
||||
- gtk_widget_get_colormap (window),
|
||||
- &trashcan_closed_mask,
|
||||
- NULL, trashcan_closed_xpm);
|
||||
+ drag_icon = gdk_pixbuf_new_from_xpm_data (drag_icon_xpm);
|
||||
+ trashcan_open = gdk_pixbuf_new_from_xpm_data (trashcan_open_xpm);
|
||||
+ trashcan_closed = gdk_pixbuf_new_from_xpm_data (trashcan_closed_xpm);
|
||||
|
||||
label = gtk_label_new ("Drop Here\n");
|
||||
|
||||
@@ -653,7 +637,7 @@ main (int argc, char **argv)
|
||||
g_signal_connect (label, "drag_leave",
|
||||
G_CALLBACK (popsite_leave), NULL);
|
||||
|
||||
- pixmap = gtk_image_new_from_pixmap (trashcan_closed, trashcan_closed_mask);
|
||||
+ pixmap = gtk_image_new_from_pixbuf (trashcan_closed);
|
||||
gtk_drag_dest_set (pixmap, 0, NULL, 0, 0);
|
||||
gtk_table_attach (GTK_TABLE (table), pixmap, 1, 2, 0, 1,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
@@ -678,12 +662,9 @@ main (int argc, char **argv)
|
||||
gtk_drag_source_set (button, GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
|
||||
target_table, n_targets,
|
||||
GDK_ACTION_COPY | GDK_ACTION_MOVE);
|
||||
- gtk_drag_source_set_icon (button,
|
||||
- gtk_widget_get_colormap (window),
|
||||
- drag_icon, drag_mask);
|
||||
+ gtk_drag_source_set_icon_pixbuf (button, drag_icon);
|
||||
|
||||
g_object_unref (drag_icon);
|
||||
- g_object_unref (drag_mask);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table), button, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
--
|
||||
cgit v0.8.3.1
|
||||
|
23
gtk2-testgtk.patch
Normal file
23
gtk2-testgtk.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From 1f905a1c174a3f5de33390c3ff47c38f627536fa Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Otte <otte@redhat.com>
|
||||
Date: Tue, 17 Aug 2010 17:10:51 +0000
|
||||
Subject: testgtk: undef GDK_DISABLE_DEPRECATED
|
||||
|
||||
We test ctree code here and that code uses pixmaps.
|
||||
---
|
||||
diff --git a/tests/testgtk.c b/tests/testgtk.c
|
||||
index 9da72cf..2720cbd 100644
|
||||
--- a/tests/testgtk.c
|
||||
+++ b/tests/testgtk.c
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
+#undef GDK_DISABLE_DEPRECATED
|
||||
+
|
||||
#include "config.h"
|
||||
|
||||
#undef G_LOG_DOMAIN
|
||||
--
|
||||
cgit v0.8.3.1
|
||||
|
69
gtk2-testview.patch
Normal file
69
gtk2-testview.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From d24a6727b866cc9f9393991f140f4c7347dcf809 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Otte <otte@redhat.com>
|
||||
Date: Wed, 21 Jul 2010 01:16:29 +0000
|
||||
Subject: gtk-demo: Adapt textview example for stipple removal
|
||||
|
||||
---
|
||||
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
|
||||
index f17f880..cfac7fd 100644
|
||||
--- a/demos/gtk-demo/textview.c
|
||||
+++ b/demos/gtk-demo/textview.c
|
||||
@@ -14,17 +14,9 @@
|
||||
|
||||
static void easter_egg_callback (GtkWidget *button, gpointer data);
|
||||
|
||||
-#define gray50_width 2
|
||||
-#define gray50_height 2
|
||||
-static char gray50_bits[] = {
|
||||
- 0x02, 0x01
|
||||
-};
|
||||
-
|
||||
static void
|
||||
create_tags (GtkTextBuffer *buffer)
|
||||
{
|
||||
- GdkBitmap *stipple;
|
||||
-
|
||||
/* Create a bunch of tags. Note that it's also possible to
|
||||
* create tags with gtk_text_tag_new() then add them to the
|
||||
* tag table for the buffer, gtk_text_buffer_create_tag() is
|
||||
@@ -74,18 +66,6 @@ create_tags (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_create_tag (buffer, "red_background",
|
||||
"background", "red", NULL);
|
||||
|
||||
- stipple = gdk_bitmap_create_from_data (NULL,
|
||||
- gray50_bits, gray50_width,
|
||||
- gray50_height);
|
||||
-
|
||||
- gtk_text_buffer_create_tag (buffer, "background_stipple",
|
||||
- "background_stipple", stipple, NULL);
|
||||
-
|
||||
- gtk_text_buffer_create_tag (buffer, "foreground_stipple",
|
||||
- "foreground_stipple", stipple, NULL);
|
||||
-
|
||||
- g_object_unref (stipple);
|
||||
-
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
|
||||
"pixels_above_lines", 30, NULL);
|
||||
|
||||
@@ -227,17 +207,9 @@ insert_text (GtkTextBuffer *buffer)
|
||||
"red_background", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
- "a stippled red background", -1,
|
||||
- "red_background",
|
||||
- "background_stipple",
|
||||
- NULL);
|
||||
-
|
||||
- gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
- gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
- "a stippled blue foreground on solid red background", -1,
|
||||
+ "a blue foreground on red background", -1,
|
||||
"blue_foreground",
|
||||
"red_background",
|
||||
- "foreground_stipple",
|
||||
NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
|
||||
|
||||
--
|
||||
cgit v0.8.3.1
|
||||
|
53
gtk2.changes
53
gtk2.changes
@ -1,3 +1,56 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 25 21:50:25 CEST 2010 - vuntz@opensuse.org
|
||||
|
||||
- Remove the remaining part of SuSEconfig.gtk2: the icon theme
|
||||
cache updating mechanism is now handled directly by all
|
||||
appropriate packages.
|
||||
- This means we don't need /var/cache/gtk-2.0/icon-theme.cache-list
|
||||
anymore, nor the %preun hack that was removing icon theme caches.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 25 12:09:21 CEST 2010 - vuntz@opensuse.org
|
||||
|
||||
- Add RPM macros (macros.gtk2) to make it easier to handle
|
||||
installation of a GTK+ 2 IM module.
|
||||
- Update SuSEconfig.gtk2 to stop handling the update of the IM
|
||||
module cache.
|
||||
- Do not touch var/adm/SuSEconfig/run-gtk in %post anymore, but
|
||||
call gtk-query-immodules-2.0 instead.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 17 11:07:28 CEST 2010 - dimstar@opensuse.org
|
||||
|
||||
- Update to version 2.21.6:
|
||||
+ Most drawing done by GTK+ itself has been ported from GDK
|
||||
drawing APIs to cairo
|
||||
+ GtkExpander gained a ::label-fill property to make the label
|
||||
fill the entire horizontal space
|
||||
+ Accessiblity:
|
||||
- Make Gail work with custom treemodels
|
||||
- Implement GailAdjustment::get_minimum_increment
|
||||
+ Bugs fixed:
|
||||
- bgo#599574: Crash in _cairo_surface_set_error
|
||||
- bgo#604391: ...assertion `ancestor != NULL' when switching
|
||||
between tab
|
||||
- bgo#618327: GtkNotebookPage should be deprecated
|
||||
- bgo#623603: meld built with pygtk-2.16.0 giving warnings
|
||||
- bgo#623865: gtkdnd: pointer grab may never finish (ungrab
|
||||
before grab)
|
||||
- bgo#624087: Missing accessor for GdkCursor.type
|
||||
- bgo#624221: Gtk-2.21 Missing accessor for GdkDevice.num_axis
|
||||
- bgo#624224: Missing accessor for GdkDisplay.closed
|
||||
- bgo#624333: Deprecate GtkRecentManager:limit
|
||||
- bgo#624687: switch-page bug when activated from menu
|
||||
- bgo#624779: GtkCalendar padding/margin/spacing/border/
|
||||
whatever is too hard...
|
||||
- bgo#625491: Generate GdkX11-2.0.typelib
|
||||
- bgo#625650: Add annotations to gtk_tree_model_iter_next()
|
||||
and gtk_tree_selection_get_selected_rows()
|
||||
- Add patches to fix brp checks, reported and fixed upstream:
|
||||
+ bg0#627128: gtk2-testview.patch
|
||||
+ bgo#627129: gtk2-testdnd.patch
|
||||
+ bgo#627130: gtk2-testgtk.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 23 08:34:51 CEST 2010 - vuntz@opensuse.org
|
||||
|
||||
|
51
gtk2.spec
51
gtk2.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package gtk2 (Version 2.21.5)
|
||||
# spec file for package gtk2 (Version 2.21.6)
|
||||
#
|
||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
Name: gtk2
|
||||
%define _name gtk+
|
||||
Version: 2.21.5
|
||||
Version: 2.21.6
|
||||
Release: 1
|
||||
# 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)
|
||||
@ -28,10 +28,10 @@ Summary: Library for Creation of Graphical User Interfaces (version 2)
|
||||
Url: http://www.gtk.org/
|
||||
Group: System/Libraries
|
||||
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{_name}/2.12/%{_name}-%{version}.tar.bz2
|
||||
Source1: SuSEconfig.gtk2
|
||||
Source2: README.SuSE
|
||||
Source3: gtkrc
|
||||
Source4: baselibs.conf
|
||||
Source5: macros.gtk2
|
||||
# PATCH-FIX-OPENSUSE gtk64.patch sbrabec@novell.com - 64-bit dual install. See also the Fedora patch for a simpler way of doing this.
|
||||
Patch8: gtk64.patch
|
||||
# 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
|
||||
@ -48,6 +48,12 @@ Patch24: gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.d
|
||||
# be here instead.
|
||||
# PATCH-FIX-OPENSUSE gtk-path-local.patch Search in /usr/local/%{_lib} by default. bnc369696 bgo534474
|
||||
Patch53: gtk-path-local.patch
|
||||
# PATCH-FIX-UPSTREAM gtk2-testview.patch bgo#627128 dimstar@opensuse.org -- fix build of testview: adapt for stripple remove. - Taken from upstream git, id d24a6727
|
||||
Patch54: gtk2-testview.patch
|
||||
# PATCH-FIX-UPSTREAM gtk2-testdnd.patch bgo#627129 dimstar@opensuse.org -- Fix build of testdnd: convert to use pixbufs as icons. Taken from upstream git, id 36f931f2
|
||||
Patch55: gtk2-testdnd.patch
|
||||
# PATCH-FIX-UPSTREAM gtk2-testgtk.patch bgo#627130 dimstar@opensuse.org -- fix build of testgtk: ctree is tested and it uses pixmaps. - Taken from upstream git, id 1f905a1c
|
||||
Patch56: gtk2-testgtk.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: atk-devel
|
||||
@ -152,7 +158,6 @@ configurable.
|
||||
translation-update-upstream
|
||||
translation-update-upstream po-properties gtk20-properties
|
||||
gnome-patch-translation-prepare
|
||||
cp -a %{S:1} .
|
||||
%if "%_lib" == "lib64"
|
||||
cp -a %{S:2} .
|
||||
# WARNING: This patch does not patch not installed demos and tests.
|
||||
@ -162,6 +167,9 @@ cp -a %{S:2} .
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch53
|
||||
%patch54 -p1
|
||||
%patch55 -p1
|
||||
%patch56 -p1
|
||||
gnome-patch-translation-update
|
||||
|
||||
%build
|
||||
@ -183,22 +191,19 @@ make
|
||||
%install
|
||||
%makeinstall
|
||||
find %{buildroot}%{_libdir} -name '*.la' -delete -print
|
||||
mkdir -p $RPM_BUILD_ROOT/sbin/conf.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0
|
||||
install -m 755 SuSEconfig.gtk2 $RPM_BUILD_ROOT/sbin/conf.d
|
||||
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%{_localstatedir}/cache/gtk-2.0
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/cache/gtk-2.0/icon-theme.cache-list
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/{,2.10.0/}{engines,filesystems,immodules,modules,printbackends}
|
||||
%find_lang gtk20
|
||||
%find_lang gtk20-properties gtk20.lang
|
||||
%if "%_lib" == "lib64"
|
||||
mv $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-2.0\
|
||||
$RPM_BUILD_ROOT%{_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 $RPM_BUILD_ROOT%{_bindir}/gtk-query-immodules-2.0 $RPM_BUILD_ROOT%{_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
|
||||
%endif
|
||||
# Install rpm macros
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
||||
cp %{S:5} %{buildroot}%{_sysconfdir}/rpm
|
||||
%fdupes $RPM_BUILD_ROOT
|
||||
|
||||
%clean
|
||||
@ -206,19 +211,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
test -d var/adm/SuSEconfig/ || mkdir -p var/adm/SuSEconfig/
|
||||
touch var/adm/SuSEconfig/run-gtk
|
||||
|
||||
%preun
|
||||
# Remove all old icon cache files created by SuSEconfig.gtk2.
|
||||
# If it is an update, files will be re-created.
|
||||
if test -f var/cache/gtk-2.0/icon-theme.cache-list ; then
|
||||
for DIR in $(<var/cache/gtk-2.0/icon-theme.cache-list) ; do
|
||||
rm -f $DIR/icon-theme.cache
|
||||
rmdir --ignore-fail-on-non-empty $DIR
|
||||
done
|
||||
rm var/cache/gtk-2.0/icon-theme.cache-list
|
||||
fi
|
||||
%if "%_lib" == "lib64"
|
||||
%{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk64.immodules
|
||||
%else
|
||||
%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk.immodules
|
||||
%endif
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
@ -239,15 +236,12 @@ fi
|
||||
%dir %{_libdir}/gtk-2.0/2*/*
|
||||
%{_libdir}/gtk-2.0/2*/*/*.so
|
||||
%dir %{_sysconfdir}/gtk-2.0
|
||||
%dir %{_localstatedir}/cache/gtk-2.0
|
||||
%ghost %{_localstatedir}/cache/gtk-2.0/icon-theme.cache-list
|
||||
%if "%_lib" == "lib64"
|
||||
%ghost %{_sysconfdir}/gtk-2.0/gtk64.immodules
|
||||
%else
|
||||
%ghost %{_sysconfdir}/gtk-2.0/gtk.immodules
|
||||
%endif
|
||||
%{_sysconfdir}/gtk-2.0/im-multipress.conf
|
||||
/sbin/conf.d/SuSEconfig.gtk2
|
||||
%{_libdir}/girepository-1.0/*.typelib
|
||||
|
||||
%files branding-upstream
|
||||
@ -273,5 +267,6 @@ fi
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%doc %{_mandir}/man*/*
|
||||
%doc %{_datadir}/gtk-doc/html/*
|
||||
%{_sysconfdir}/rpm/macros.gtk2
|
||||
|
||||
%changelog
|
||||
|
35
macros.gtk2
Normal file
35
macros.gtk2
Normal file
@ -0,0 +1,35 @@
|
||||
# RPM macros for packages installing a GTK+ IM module
|
||||
#
|
||||
###
|
||||
#
|
||||
# When a package installs a GTK+ IM module, it should use all
|
||||
# three macros:
|
||||
#
|
||||
# - %gtk2_immodule_requires in the preamble
|
||||
# - %gtk2_immodule_post in %post
|
||||
# - %gtk2_immodule_postun in %postun
|
||||
#
|
||||
###
|
||||
|
||||
%gtk2_immodule_requires \
|
||||
Requires(post): gtk2 \
|
||||
Requires(postun): gtk2
|
||||
|
||||
# On install, update the cache
|
||||
%gtk2_immodule_post \
|
||||
%if "%_lib" == "lib64" \
|
||||
%{_bindir}/gtk-query-immodules-2.0-64 > {_sysconfdir}/gtk64.immodules \
|
||||
%else \
|
||||
%{_bindir}/gtk-query-immodules-2.0 > {_sysconfdir}/gtk.immodules \
|
||||
%endif
|
||||
|
||||
# On uninstall, update the cache. Note: we ignore upgrades (already
|
||||
# handled in %post of the new package).
|
||||
%gtk2_immodule_postun \
|
||||
if [ $1 -eq 0 ]; then \
|
||||
%if "%_lib" == "lib64" \
|
||||
%{_bindir}/gtk-query-immodules-2.0-64 > {_sysconfdir}/gtk64.immodules \
|
||||
%else \
|
||||
%{_bindir}/gtk-query-immodules-2.0 > {_sysconfdir}/gtk.immodules \
|
||||
%endif \
|
||||
fi
|
Loading…
Reference in New Issue
Block a user