DESCRIPTION = "Dropbear SSH Implementation" LICENSE = "MIT" DEPENDS = "virtual/libc zlib ncurses" PR = "r2" SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \ file://${FILESDIR}/configure.patch;patch=1 \ file://${FILESDIR}/initd.patch;patch=1" S = "${WORKDIR}/dropbear-${PV}" inherit autotools update-rc.d INITSCRIPT_NAME = "dropbear" INITSCRIPT_PARAMS = "defaults 10" CFLAGS_prepend = "-I. " LD = "${CC}" do_install_prepend () { install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dropbear install -m 0755 debian/dropbear.init ${D}${sysconfdir}/init.d/dropbear } pkg_postinst_append () { if [ "x$D" = "x" ]; then if [ ! -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then dropbearkey -t rsa -f ${sysconfdir}/dropbear/dropbear_rsa_host_key fi if [ ! -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then dropbearkey -t dss -f ${sysconfdir}/dropbear/dropbear_dss_host_key fi fi } pkg_postrm_append () { if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then rm ${sysconfdir}/dropbear/dropbear_rsa_host_key fi if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then rm ${sysconfdir}/dropbear/dropbear_dss_host_key fi }