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 | |
| 5 | RDEPENDS_${PN} = "kbd" |
| 6 | |
| 7 | LICENSE = "GPLv2" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 9 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 10 | PR = "r31" |
| 11 | |
| 12 | INHIBIT_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. |
| 16 | python __anonymous() { |
| 17 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): |
| 18 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
| 19 | } |
| 20 | |
| 21 | inherit update-rc.d |
| 22 | |
| 23 | SRC_URI = "file://keymap.sh \ |
| 24 | file://GPLv2.patch" |
| 25 | |
| 26 | INITSCRIPT_NAME = "keymap.sh" |
| 27 | INITSCRIPT_PARAMS = "start 01 S ." |
| 28 | |
| 29 | S = "${WORKDIR}" |
| 30 | |
| 31 | do_install () { |
| 32 | # Only install the script if 'sysvinit' is in DISTRO_FEATURES |
| 33 | # THe ulitity this script provides could be achieved by systemd-vconsole-setup.service |
| 34 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
| 35 | install -d ${D}${sysconfdir}/init.d/ |
| 36 | install -m 0755 ${WORKDIR}/keymap.sh ${D}${sysconfdir}/init.d/ |
| 37 | fi |
| 38 | } |
| 39 | |
Andrew Geissler | 99467da | 2019-02-25 18:54:23 -0600 | [diff] [blame^] | 40 | PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | pkg_postinst_${PN} () { |
| 42 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then |
| 43 | if [ -n "$D" ]; then |
| 44 | OPTS="--root=$D" |
| 45 | fi |
| 46 | systemctl $OPTS mask keymap.service |
| 47 | fi |
| 48 | } |
| 49 | |
| 50 | ALLOW_EMPTY_${PN} = "1" |