From 8751c2929c598c1db2a8515ee308f6c0b0bb2e99 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Thu, 3 Feb 2011 22:54:39 +0100 Subject: [PATCH] new package: add package 'setxkbmap' Signed-off-by: Stephan Raue --- packages/x11/app/setxkbmap/build | 31 +++++++++++++ packages/x11/app/setxkbmap/init.d/72_keyboard | 43 +++++++++++++++++++ packages/x11/app/setxkbmap/install | 27 ++++++++++++ packages/x11/app/setxkbmap/meta | 36 ++++++++++++++++ packages/x11/xserver/xorg-server/meta | 2 +- 5 files changed, 138 insertions(+), 1 deletion(-) create mode 100755 packages/x11/app/setxkbmap/build create mode 100644 packages/x11/app/setxkbmap/init.d/72_keyboard create mode 100755 packages/x11/app/setxkbmap/install create mode 100644 packages/x11/app/setxkbmap/meta diff --git a/packages/x11/app/setxkbmap/build b/packages/x11/app/setxkbmap/build new file mode 100755 index 0000000000..d8601440b8 --- /dev/null +++ b/packages/x11/app/setxkbmap/build @@ -0,0 +1,31 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + +make diff --git a/packages/x11/app/setxkbmap/init.d/72_keyboard b/packages/x11/app/setxkbmap/init.d/72_keyboard new file mode 100644 index 0000000000..dc1c643800 --- /dev/null +++ b/packages/x11/app/setxkbmap/init.d/72_keyboard @@ -0,0 +1,43 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +# setup keyboard layout +# +# runlevels: openelec + +OPENELEC_SETTINGS="$HOME/.xbmc/userdata/addon_data/os.openelec.settings/settings.xml" + +( + if [ -f "$OPENELEC_SETTINGS" ]; then + X11_KEYMAP=`grep X11_KEYMAP $OPENELEC_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"` + + progress "setup keyboard layout" + + if [ -z $X11_KEYMAP ]; then + X11_KEYMAP="us" + fi + + # waiting for Xorg to start + wait_for_xorg + + # setup keymap + setxkbmap -display $DISPLAY $X11_KEYMAP + fi +)& diff --git a/packages/x11/app/setxkbmap/install b/packages/x11/app/setxkbmap/install new file mode 100755 index 0000000000..7f41bd205f --- /dev/null +++ b/packages/x11/app/setxkbmap/install @@ -0,0 +1,27 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/$1 $INSTALL/usr/bin + diff --git a/packages/x11/app/setxkbmap/meta b/packages/x11/app/setxkbmap/meta new file mode 100644 index 0000000000..415e262127 --- /dev/null +++ b/packages/x11/app/setxkbmap/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="setxkbmap" +PKG_VERSION="1.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/app/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11" +PKG_BUILD_DEPENDS="toolchain libX11" +PKG_PRIORITY="optional" +PKG_SECTION="x11/app" +PKG_SHORTDESC="setxkbmap: Sets the keyboard using the X Keyboard Extension" +PKG_LONGDESC="Setxkbmap sets the keyboard using the X Keyboard Extension." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/xserver/xorg-server/meta b/packages/x11/xserver/xorg-server/meta index a313fc3259..6c4e243beb 100644 --- a/packages/x11/xserver/xorg-server/meta +++ b/packages/x11/xserver/xorg-server/meta @@ -56,4 +56,4 @@ fi done # Tools - PKG_DEPENDS="$PKG_DEPENDS pciutils ratpoison xrandr" + PKG_DEPENDS="$PKG_DEPENDS pciutils ratpoison xrandr setxkbmap"