]> git.pld-linux.org Git - packages/system-config-keyboard.git/commitdiff
- up to 1.3.1
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 3 Mar 2012 15:15:31 +0000 (15:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    s-c-keyboard-do_not_remove_the_OK_button.patch -> 1.1
    sck-1.3.1-no-pyxf86config.patch -> 1.1
    system-config-keyboard-beenset.patch -> 1.2
    system-config-keyboard-fixcomments.patch -> 1.2
    system-config-keyboard.spec -> 1.18

s-c-keyboard-do_not_remove_the_OK_button.patch [new file with mode: 0644]
sck-1.3.1-no-pyxf86config.patch [new file with mode: 0644]
system-config-keyboard-beenset.patch [deleted file]
system-config-keyboard-fixcomments.patch [deleted file]
system-config-keyboard.spec

diff --git a/s-c-keyboard-do_not_remove_the_OK_button.patch b/s-c-keyboard-do_not_remove_the_OK_button.patch
new file mode 100644 (file)
index 0000000..ba20456
--- /dev/null
@@ -0,0 +1,20 @@
+do not remove the OK button
+
+There's no hsep. The ugly hack removed the necessary OK button.
+
+Index: system-config-keyboard-1.3.1/src/keyboard_gui.py
+===================================================================
+--- system-config-keyboard-1.3.1.orig/src/keyboard_gui.py
++++ system-config-keyboard-1.3.1/src/keyboard_gui.py
+@@ -254,10 +254,6 @@ class moduleClass(Module):
+         okButton = self.mainWindow.add_button('gtk-ok', 0)
+         okButton.connect("clicked", self._okClicked)
+-        # Remove the hsep from the dialog.  It's ugly.
+-        hsep = self.mainWindow.get_children()[0].get_children()[0]
+-        self.mainWindow.get_children()[0].remove(hsep)
+-
+         self.mainWindow.vbox.pack_start(self.vbox)
+         self.mainWindow.show_all()
+
diff --git a/sck-1.3.1-no-pyxf86config.patch b/sck-1.3.1-no-pyxf86config.patch
new file mode 100644 (file)
index 0000000..34db967
--- /dev/null
@@ -0,0 +1,181 @@
+diff -up system-config-keyboard-1.3.1/src/keyboard_backend.py.jx system-config-keyboard-1.3.1/src/keyboard_backend.py
+--- system-config-keyboard-1.3.1/src/keyboard_backend.py.jx    2009-07-26 18:32:19.000000000 -0400
++++ system-config-keyboard-1.3.1/src/keyboard_backend.py       2011-12-01 15:54:28.235998250 -0500
+@@ -1,96 +0,0 @@
+-#
+-# keyboard_backend.py - backend code for keyboard configuration
+-#
+-# Copyright (C) 2002, 2003 Red Hat, Inc.
+-# Brent Fox <bfox@redhat.com>
+-#
+-# Copyright (C) 2008 Lubomir Kundrak <lkundrak@redhat.com>
+-#
+-# This program is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+-#
+-
+-#!/usr/bin/python2.2
+-
+-import sys
+-import os
+-
+-class KeyboardBackend:
+-
+-    def modifyXconfig(self, fullname, layout, model, variant, options):
+-        #import xf86config and make the necessary changes
+-        if os.access("/etc/X11/XF86Config", os.W_OK) or os.access("/etc/X11/xorg.conf", os.W_OK):        
+-            import xf86config
+-            (xconfig, xconfigpath) = xf86config.readConfigFile()
+-            try:
+-                keyboard = xf86config.getCoreKeyboard(xconfig)
+-            except:
+-                xconfig.comment = "\n# This configuration file was broken by system-config-keyboard\n"
+-                keyboard = xf86config.XF86ConfInput ();
+-                keyboard.comment = "\n# Keyboard added by system-config-keyboard\n"
+-                keyboard.identifier = "Keyboard0"
+-                keyboard.driver = "kbd"
+-                keyboard.options.insert (xf86config.XF86Option("XkbModel", "pc101"))
+-                keyboard.options.insert (xf86config.XF86Option("XkbLayout", "us"))
+-                xconfig.input.insert (keyboard)
+-                if len(xconfig.layout) == 0:
+-                    xconfig.layout.insert(xf86config.XF86ConfLayout())
+-
+-                xconfig.layout[0].inputs.insert (xf86config.XF86ConfInputref ("Keyboard0", "CoreKeyboard"));
+-            
+-            found = 0
+-            for o in keyboard.options:
+-                if o.name == "XkbLayout":
+-                    found = 1
+-
+-            if not found:
+-                #If there's not an XkbLayout option for some reason, create one
+-                option = xf86config.XF86Option("XkbLayout")
+-                keyboard.options.insert(option)
+-
+-            found_variant = None
+-            found_options = None
+-            count = 0
+-            for o in keyboard.options:
+-                if o.name == "XkbModel":
+-                    o.val = model
+-                if o.name == "XkbLayout":
+-                    o.val = layout
+-                if o.name == "XkbVariant":
+-                    found_variant = 1
+-                    if variant == "":
+-                        #remove variant here
+-                        keyboard.options.remove(count)
+-                    o.val = variant
+-
+-                if o.name == "XkbOptions":
+-                    found_options = 1
+-                    if options == "":
+-                        #remove option here
+-                        keyboard.options.remove(count)
+-
+-                count = count + 1
+-
+-            if variant != "" and found_variant == None:
+-                #Need to create a XkbVariant entry
+-                opt = xf86config.XF86Option("XkbVariant", variant)
+-                keyboard.options.insert(opt)
+-
+-            if options != "" and found_options == None:
+-                #Need to create an XkbOptions entry
+-                opt = xf86config.XF86Option("XkbOptions", options)
+-                keyboard.options.insert(opt)
+-
+-            xconfig.write(xconfigpath)
+-    
+diff -up system-config-keyboard-1.3.1/src/keyboard_cli.py.jx system-config-keyboard-1.3.1/src/keyboard_cli.py
+--- system-config-keyboard-1.3.1/src/keyboard_cli.py.jx        2009-07-26 20:31:30.000000000 -0400
++++ system-config-keyboard-1.3.1/src/keyboard_cli.py   2011-12-01 15:53:29.390000097 -0500
+@@ -21,15 +21,12 @@
+ import sys
+ import string
+-import keyboard_backend
+ import system_config_keyboard.keyboard as keyboard
+ import gettext
+ _ = gettext.gettext
+ gettext.textdomain('system-config-keyboard')
+-keyboardBackend = keyboard_backend.KeyboardBackend()
+-
+ class childWindow:
+     def usage(self):
+         print _("""Usage: system-config-keyboard [--help] [--noui] [--text] [<keyboardtype>]
+@@ -67,7 +64,6 @@ class childWindow:
+                 self.kbd.set(kbdtype)
+                 self.kbd.write()
+                 self.kbd.activate()
+-                keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
+             else:
+                 print (_("'%s' is an invalid keymap.  Please run 'system-config-keyboard --help' "
+                          "for a list of keymaps" % kbdtype))
+diff -up system-config-keyboard-1.3.1/src/keyboard_gui.py.jx system-config-keyboard-1.3.1/src/keyboard_gui.py
+--- system-config-keyboard-1.3.1/src/keyboard_gui.py.jx        2011-11-30 14:38:11.000000000 -0500
++++ system-config-keyboard-1.3.1/src/keyboard_gui.py   2011-12-01 15:54:01.257000089 -0500
+@@ -41,7 +41,6 @@ from firstboot.functions import *
+ from firstboot.module import *
+ sys.path.append('/usr/share/system-config-keyboard')
+-import keyboard_backend
+ _ = gettext.gettext
+ gettext.textdomain('system-config-keyboard')
+@@ -62,8 +61,6 @@ except:
+     except:
+         pass
+-keyboardBackend = keyboard_backend.KeyboardBackend()
+-
+ # hack around the fact that scroll-to in the installer acts wierd
+ def setupTreeViewFixupIdleHandler(view, store):
+     id = {}
+@@ -117,8 +114,6 @@ class moduleClass(Module):
+         # If the /etc/X11/XF86Config file exists, then change it's keyboard settings
+         fullname, layout, model, variant, options = self.kbdDict[self.kbd.get()]
+-        keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
+-
+         try:
+             #If we're in reconfig mode, this will fail because there is no self.mainWindow
+             self.mainWindow.destroy()
+diff -up system-config-keyboard-1.3.1/src/keyboard_tui.py.jx system-config-keyboard-1.3.1/src/keyboard_tui.py
+--- system-config-keyboard-1.3.1/src/keyboard_tui.py.jx        2009-07-26 21:20:04.000000000 -0400
++++ system-config-keyboard-1.3.1/src/keyboard_tui.py   2011-12-01 15:53:58.874000023 -0500
+@@ -29,14 +29,11 @@
+ from snack import *
+ import gettext
+-import keyboard_backend
+ import system_config_keyboard.keyboard as keyboard
+ _ = gettext.gettext
+ gettext.textdomain('system-config-keyboard')
+-keyboardBackend = keyboard_backend.KeyboardBackend()
+-
+ class KeyboardWindow:
+     def __call__(self, screen):
+         self.kbd = keyboard.Keyboard()
+@@ -103,6 +100,5 @@ class childWindow:
+                 kbd.write()
+                 kbd.activate()
+                 fullname, layout, model, variant, options = rc                
+-                keyboardBackend.modifyXconfig(fullname, layout, model, variant, options)
+                 DONE = 1
+                 
diff --git a/system-config-keyboard-beenset.patch b/system-config-keyboard-beenset.patch
deleted file mode 100644 (file)
index 7246625..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-https://bugzilla.redhat.com/attachment.cgi?id=305465
-Patch by Tim Waugh. Already commited upstream.
-
-diff -up system-config-keyboard-1.2.15/src/keyboard_gui.py.traceback system-config-keyboard-1.2.15/src/keyboard_gui.py
---- system-config-keyboard-1.2.15/src/keyboard_gui.py.traceback        2008-05-15 11:41:30.000000000 +0100
-+++ system-config-keyboard-1.2.15/src/keyboard_gui.py  2008-05-15 11:43:11.000000000 +0100
-@@ -133,8 +133,8 @@ class moduleClass(Module):
-     def createScreen(self, defaultByLang=None, kbd=None):
-         if kbd is None:
-             kbd = keyboard.Keyboard()
--        else:
--            self.kbd = kbd
-+
-+        self.kbd = kbd
-         self.vbox = gtk.VBox()
-         self.vbox.set_spacing(10)
diff --git a/system-config-keyboard-fixcomments.patch b/system-config-keyboard-fixcomments.patch
deleted file mode 100644 (file)
index af7324a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: src/keyboard_backend.py
-===================================================================
---- src/keyboard_backend.py    (revision 562)
-+++ src/keyboard_backend.py    (working copy)
-@@ -36,9 +36,9 @@
-             try:
-                 keyboard = xf86config.getCoreKeyboard(xconfig)
-             except:
--                xconfig.comment = '# This configuration file was broken by system-config-keyboard'
-+                xconfig.comment = "\n# This configuration file was broken by system-config-keyboard\n"
-                 keyboard = xf86config.XF86ConfInput ();
--                keyboard.comment = "# Keyboard added by system-config-keyboard"
-+                keyboard.comment = "\n# Keyboard added by system-config-keyboard\n"
-                 keyboard.identifier = "Keyboard0"
-                 keyboard.driver = "kbd"
-                 keyboard.options.insert (xf86config.XF86Option("XkbModel", "pc101"))
index 149a7afe9fdb381a06597c9e7672c5b03d25a150..c4b135ee25f785ef2855559e61f197d716be4a79 100644 (file)
@@ -1,20 +1,19 @@
 Summary:       A graphical interface for modifying the keyboard
 Summary(pl.UTF-8):     Graficzny interfejs do zmiany klawiatury
 Name:          system-config-keyboard
-Version:       1.2.15
-Release:       7
-License:       GPL
+Version:       1.3.1
+Release:       0.10
+License:       GPL v2+
 Group:         Base
-# https://fedorahosted.org/releases/s/y/system-config-keyboard/ (not yet)
-Source0:       %{name}-%{version}.tar.gz
-# Source0-md5: 13a0e4444f7fcbb6a3e9c88f42285faf
-Patch1:                %{name}-beenset.patch
-Patch2:                %{name}-fixcomments.patch
+Source0:       https://fedorahosted.org/releases/s/y/system-config-keyboard/%{name}-%{version}.tar.gz
+# Source0-md5: 012b1aec6d237f853bea6824e71d19ed
+Patch0:                s-c-keyboard-do_not_remove_the_OK_button.patch
+Patch1:                sck-1.3.1-no-pyxf86config.patch
 URL:           https://fedorahosted.org/system-config-keyboard/
 BuildRequires: desktop-file-utils
 BuildRequires: gettext-devel
 BuildRequires: intltool
-BuildRequires: sed >= 4
+BuildRequires: sed >= 4.0
 Requires(post,postun): gtk-update-icon-cache
 Requires(post,postun): hicolor-icon-theme
 Requires:      firstboot >= 1.99
@@ -23,8 +22,6 @@ Requires:     python >= 1:2.0
 Requires:      python-rhpl >= 0.53
 Requires:      python-xf86config
 BuildArch:     noarch
-ExclusiveOS:   Linux
-ExcludeArch:   s390 s390x ppc64
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -37,15 +34,18 @@ umożliwiający użytkownikowi zmianę domyślnej klawiatury w systemie.
 
 %prep
 %setup -q
+%patch0 -p1
 %patch1 -p1
-%patch2 -p0
+
+%build
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} install \
        INSTROOT=$RPM_BUILD_ROOT
 
+
 desktop-file-install --vendor system --delete-original \
        --dir $RPM_BUILD_ROOT%{_desktopdir} \
        --add-category Application \
@@ -54,9 +54,12 @@ desktop-file-install --vendor system --delete-original \
 
 sed -i 's/\.py/.pyc/' $RPM_BUILD_ROOT%{_sbindir}/system-config-keyboard
 
-%py_comp $RPM_BUILD_ROOT%{_datadir}/system-config-keyboard
-%py_ocomp $RPM_BUILD_ROOT%{_datadir}/system-config-keyboard
-%py_postclean %{_datadir}/system-config-keyboard
+%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}
+%py_comp $RPM_BUILD_ROOT%{_datadir}/%{name}
+
+%py_postclean %{_datadir}/%{name}
 
 %find_lang %{name}
 
@@ -71,13 +74,21 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/security/console.apps/system-config-keyboard
-%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/system-config-keyboard
-%attr(755,root,root) %{_sbindir}/system-config-keyboard
-%dir %{_datadir}/system-config-keyboard
-%{_datadir}/system-config-keyboard/*
+%config(noreplace) %verify(not md5 mtime size) /etc/security/console.apps/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/%{name}
+%attr(755,root,root) %{_bindir}/%{name}
+%attr(755,root,root) %{_sbindir}/%{name}
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/*.py[co]
+%dir %{_datadir}/%{name}/pixmaps
+%{_datadir}/%{name}/pixmaps/%{name}.png
+%{_desktopdir}/%{name}.desktop
+%{_iconsdir}/hicolor/*/apps/%{name}.png
+
 %dir %{_datadir}/firstboot
 %dir %{_datadir}/firstboot/modules
-%{_datadir}/firstboot/modules/*
-%{_desktopdir}/system-config-keyboard.desktop
-%{_iconsdir}/hicolor/48x48/apps/system-config-keyboard.png
+%{_datadir}/firstboot/modules/*.py
+
+# python-%{name}
+%dir %{py_sitescriptdir}/system_config_keyboard
+%{py_sitescriptdir}/system_config_keyboard/*.py[co]
This page took 0.732199 seconds and 4 git commands to generate.