Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Keyboard maps" |
| 2 | DESCRIPTION = "Keymaps and initscript to set the keymap on bootup." |
| 3 | SECTION = "base" |
| 4 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 5 | RDEPENDS:${PN} = "kbd" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 7 | LICENSE = "GPL-2.0-only" |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://keymap.sh;beginline=5;endline=5;md5=829e563511c9a1d6d41f17a7a4989d6a" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | |
| 11 | INHIBIT_DEFAULT_DEPS = "1" |
| 12 | |
| 13 | # As the recipe doesn't inherit systemd.bbclass, we need to set this variable |
| 14 | # manually to avoid unnecessary postinst/preinst generated. |
| 15 | python __anonymous() { |
| 16 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): |
| 17 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
| 18 | } |
| 19 | |
| 20 | inherit update-rc.d |
| 21 | |
Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 22 | SRC_URI = "file://keymap.sh" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | |
| 24 | INITSCRIPT_NAME = "keymap.sh" |
| 25 | INITSCRIPT_PARAMS = "start 01 S ." |
| 26 | |
| 27 | S = "${WORKDIR}" |
| 28 | |
| 29 | do_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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" |
| 39 | pkg_postinst:${PN} () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 48 | ALLOW_EMPTY:${PN} = "1" |