summaryrefslogtreecommitdiff
path: root/dropbear/dropbear_0.41.oe
blob: dc9c26f7075dbeec173b5ee6c56f2c29ce426d7f (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
42
DESCRIPTION = "Dropbear SSH Implementation"
LICENSE = "MIT"
DEPENDS = "zlib"
PR = "r2"

SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
	   file://configure.patch;patch=1 \
	   file://initd.patch;patch=1 \
	   file://allow-nopw.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 [ -n "$D"  ]; then exit 1; fi
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
}

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
}