SUMMARY = "SSH public key installation"
DESCRIPTION = "Installs SSH public key for root user"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

inherit allarch

SRC_URI = "file://authorized_keys"

# Since we're not unpacking source code, just copying files
do_configure[noexec] = "1"
do_compile[noexec] = "1"

do_install() {
    install -d ${D}${ROOT_HOME}/.ssh
    install -m 0600 ${WORKDIR}/authorized_keys ${D}${ROOT_HOME}/.ssh/authorized_keys
}

FILES:${PN} = "${ROOT_HOME}/.ssh/authorized_keys"
RDEPENDS:${PN} = "openssh"