blob: cde8246f4155a407279c9511e77ce224157e6237 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
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"
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
}
|