xref: /openbmc/openbmc/poky/meta/recipes-core/kbd/kbd_2.7.1.bb (revision 96e4b4e121e0e2da1535d7d537d6a982a6ff5bc0)
1SUMMARY = "Keytable files and keyboard utilities"
2HOMEPAGE = "http://www.kbd-project.org/"
3DESCRIPTION = "The kbd project contains tools for managing Linux console (Linux console, virtual terminals, keyboard, etc.) – mainly, what they do is loading console fonts and keyboard maps."
4
5# consolefonts and keymaps contain also some public domain and author notice licenses
6LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later & GPL-3.0-or-later"
7LIC_FILES_CHKSUM = " \
8    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
9    file://data/keymaps/pine/en.map;beginline=2;endline=15;md5=20914a59c0546a7b77ebf959bc88ad5d \
10"
11LICENSE:${PN} = "GPL-2.0-or-later & LGPL-2.0-or-later"
12LICENSE:${PN}-consolefonts = "GPL-2.0-or-later"
13LICENSE:${PN}-consoletrans = "GPL-2.0-or-later"
14LICENSE:${PN}-keymaps-pine = "GPL-3.0-or-later"
15LICENSE:${PN}-keymaps = "GPL-2.0-or-later"
16LICENSE:${PN}-unimaps = "GPL-2.0-or-later"
17
18inherit autotools gettext pkgconfig
19
20DEPENDS += "flex-native"
21
22RREPLACES:${PN} = "console-tools"
23RPROVIDES:${PN} = "console-tools"
24RCONFLICTS:${PN} = "console-tools"
25
26SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
27           "
28
29SRC_URI[sha256sum] = "f167d899d92b56ccf12f6f49355173f93870a95f15d8aeebf5fdcd28a621aca8"
30
31# 'gzip -n' is set due to https://github.com/legionus/kbd/issues/124
32EXTRA_OECONF = "--disable-tests --enable-compress='gzip -n'"
33PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
34                  "
35
36PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
37
38PACKAGES += "${PN}-consolefonts ${PN}-keymaps-pine ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
39
40FILES:${PN}-consolefonts = "${datadir}/consolefonts"
41FILES:${PN}-consoletrans = "${datadir}/consoletrans"
42FILES:${PN}-keymaps-pine = "${datadir}/keymaps/pine"
43FILES:${PN}-keymaps = "${datadir}/keymaps"
44FILES:${PN}-unimaps = "${datadir}/unimaps"
45
46RRECOMMENDS:${PN}-keymaps = "${PN}-keymaps-pine"
47
48do_install:append () {
49    if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)}" = "yes" ] \
50    && [ -f ${D}${sysconfdir}/pam.d/vlock ]; then
51        mv -f ${D}${sysconfdir}/pam.d/vlock ${D}${sysconfdir}/pam.d/vlock.kbd
52    fi
53}
54
55inherit update-alternatives
56
57ALTERNATIVE:${PN} = "chvt deallocvt fgconsole openvt showkey \
58                     ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'vlock','', d)}"
59ALTERNATIVE_PRIORITY = "100"
60
61BBCLASSEXTEND = "native"
62