diff --git a/system-config-keyboard-1.2.14-nocorekeyb.patch b/system-config-keyboard-1.2.14-nocorekeyb.patch new file mode 100644 index 0000000..5c99bb6 --- /dev/null +++ b/system-config-keyboard-1.2.14-nocorekeyb.patch @@ -0,0 +1,37 @@ +Index: src/keyboard_backend.py +=================================================================== +--- src/keyboard_backend.py (revision 559) ++++ src/keyboard_backend.py (working copy) +@@ -1,9 +1,11 @@ + # +-# keyboard_backend.py - backend code for mouse configuration ++# keyboard_backend.py - backend code for keyboard configuration + # + # Copyright (C) 2002, 2003 Red Hat, Inc. + # Brent Fox + # ++# Copyright (C) 2008 Lubomir Kundrak ++# + # 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 +@@ -31,7 +33,18 @@ + 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() +- keyboard = xf86config.getCoreKeyboard(xconfig) ++ try: ++ keyboard = xf86config.getCoreKeyboard(xconfig) ++ except: ++ xconfig.comment = '# This configuration file was broken by system-config-keyboard' ++ keyboard = xf86config.XF86ConfInput (); ++ keyboard.comment = "# Keyboard added by system-config-keyboard" ++ keyboard.identifier = "Keyboard0" ++ keyboard.driver = "kbd" ++ keyboard.options.insert (xf86config.XF86Option("XkbModel", "pc101")) ++ keyboard.options.insert (xf86config.XF86Option("XkbLayout", "us")) ++ xconfig.input.insert (keyboard) ++ xconfig.layout[0].inputs.insert (xf86config.XF86ConfInputref ("Keyboard0", "CoreKeyboard")); + + found = 0 + for o in keyboard.options: diff --git a/system-config-keyboard.spec b/system-config-keyboard.spec index 3a12317..edc3ef2 100644 --- a/system-config-keyboard.spec +++ b/system-config-keyboard.spec @@ -1,14 +1,15 @@ Name: system-config-keyboard Version: 1.2.14 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A graphical interface for modifying the keyboard Group: System Environment/Base -License: GPL+ +License: GPL2+ URL: https://fedorahosted.org/system-config-keyboard/ Source0: %{name}-%{version}.tar.bz2 Patch0: system-config-keyboard-1.2.14-desktop.patch Patch1: system-config-keyboard-1.2.14-cherrypick.patch +Patch2: system-config-keyboard-1.2.14-nocorekeyb.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -34,6 +35,7 @@ the user to change the default keyboard of the system. %setup -q %patch0 -p0 -b .desktop %patch1 -p0 -b .cherrypick +%patch2 -p0 -b .nocorekeyb %build @@ -81,7 +83,11 @@ fi %changelog -* Sat Apr 05 2008 Bill Nottingham 1.2.14-2 +* Sat Apr 12 2008 Lubomir Kundrak 1.2.14-3 +- Handle situations where CoreKeyboard is not present +- Fix License tag + +* Sat Apr 05 2008 Lubomir Kundrak 1.2.14-2 - Do not show in KDE and Gnome menus - Rework specfile