summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/keymaps/keymaps_1.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/keymaps/keymaps_1.0.bb')
-rw-r--r--meta/recipes-bsp/keymaps/keymaps_1.0.bb48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
new file mode 100644
index 0000000000..925161b5d2
--- /dev/null
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -0,0 +1,48 @@
1SUMMARY = "Keyboard maps"
2DESCRIPTION = "Keymaps and initscript to set the keymap on bootup."
3SECTION = "base"
4
5RDEPENDS_${PN} = "kbd"
6
7LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
9PACKAGE_ARCH = "${MACHINE_ARCH}"
10PR = "r31"
11
12INHIBIT_DEFAULT_DEPS = "1"
13
14# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
15# manually to avoid unnecessary postinst/preinst generated.
16python __anonymous() {
17 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
18 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
19}
20
21inherit update-rc.d
22
23SRC_URI = "file://keymap.sh \
24 file://GPLv2.patch"
25
26INITSCRIPT_NAME = "keymap.sh"
27INITSCRIPT_PARAMS = "start 01 S ."
28
29do_install () {
30 # Only install the script if 'sysvinit' is in DISTRO_FEATURES
31 # THe ulitity this script provides could be achieved by systemd-vconsole-setup.service
32 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
33 install -d ${D}${sysconfdir}/init.d/
34 install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/
35 fi
36}
37
38DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
39pkg_postinst_${PN} () {
40 if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
41 if [ -n "$D" ]; then
42 OPTS="--root=$D"
43 fi
44 systemctl $OPTS mask keymap.service
45 fi
46}
47
48ALLOW_EMPTY_${PN} = "1"