summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-11-22 14:30:58 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-11-22 14:30:58 +0100
commite4c70cd1be6723553412b615c206b5559a854df3 (patch)
tree44e7576a76a96e850fd895a29da1faad1ad9c817 /package
parentb8d0d2ff18de3f4de66e89a302cb277328f58433 (diff)
add support for keyboard layout as a runtime option
Diffstat (limited to 'package')
-rw-r--r--package/bkeymaps/Makefile33
-rw-r--r--package/bkeymaps/files/bkeymaps.postinst4
-rw-r--r--package/bkeymaps/files/kbd.init26
-rw-r--r--package/busybox/config/console-tools/Config.in2
4 files changed, 65 insertions, 0 deletions
diff --git a/package/bkeymaps/Makefile b/package/bkeymaps/Makefile
new file mode 100644
index 000000000..735bc38f8
--- /dev/null
+++ b/package/bkeymaps/Makefile
@@ -0,0 +1,33 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= bkeymaps
+PKG_VERSION:= 1.13
+PKG_RELEASE:= 1
+PKG_MD5SUM:= a68058ab4a81cf9a8dcbaaa7a5df5b11
+PKG_DESCR:= binary keymaps for busybox loadkmap
+PKG_SECTION:= utils
+PKG_URL:= http://dev.alpinelinux.org/bkeymaps/
+PKG_SITES:= http://dev.alpinelinux.org/bkeymaps/
+
+PKG_DFLT_BKEYMAPS:= y if ADK_TARGET_WITH_INPUT
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,BKEYMAPS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIG_STYLE:= manual
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+
+KBD_LAYOUT:=$(strip $(subst ",, $(ADK_RUNTIME_KBD_LAYOUT)))
+KBD_DIR:=$(shell echo $(KBD_LAYOUT)|cut -c 1-2)
+
+do-install:
+ $(INSTALL_DIR) $(IDIR_BKEYMAPS)/usr/share/keymaps/
+ $(INSTALL_DATA) $(WRKBUILD)/bkeymaps/$(KBD_DIR)/$(KBD_LAYOUT).bmap \
+ $(IDIR_BKEYMAPS)/usr/share/keymaps/keymap.bmap
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/bkeymaps/files/bkeymaps.postinst b/package/bkeymaps/files/bkeymaps.postinst
new file mode 100644
index 000000000..8af581f06
--- /dev/null
+++ b/package/bkeymaps/files/bkeymaps.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+
+add_rcconf bkeymaps kbd NO
diff --git a/package/bkeymaps/files/kbd.init b/package/bkeymaps/files/kbd.init
new file mode 100644
index 000000000..ec8bad244
--- /dev/null
+++ b/package/bkeymaps/files/kbd.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#PKG bkeymaps
+#INIT 6
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ [[ $kbd = NO ]] && exit 0
+ exec sh $0 start
+ ;;
+start)
+ [ -f /usr/share/keymaps/keymap.bmap ] || exit
+ loadkmap < /usr/share/keymaps/keymap.bmap
+ ;;
+stop)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ ;;
+esac
+exit $?
diff --git a/package/busybox/config/console-tools/Config.in b/package/busybox/config/console-tools/Config.in
index 7b1d3ac2e..4a86ff740 100644
--- a/package/busybox/config/console-tools/Config.in
+++ b/package/busybox/config/console-tools/Config.in
@@ -39,6 +39,7 @@ config BUSYBOX_DUMPKMAP
config BUSYBOX_KBD_MODE
bool "kbd_mode"
+ default y if ADK_TARGET_WITH_INPUT
default n
help
This program reports and sets keyboard mode.
@@ -51,6 +52,7 @@ config BUSYBOX_LOADFONT
config BUSYBOX_LOADKMAP
bool "loadkmap"
+ default y if ADK_TARGET_WITH_INPUT
default n
help
This program loads a keyboard translation table from