summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dropbear/dropbear.inc
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-core/dropbear/dropbear.inc
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/dropbear/dropbear.inc')
-rw-r--r--meta/recipes-core/dropbear/dropbear.inc80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
new file mode 100644
index 0000000000..1d78d5c59b
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -0,0 +1,80 @@
1DESCRIPTION = "Dropbear is a lightweight SSH and SCP Implementation"
2HOMEPAGE = "http://matt.ucc.asn.au/dropbear/dropbear.html"
3SECTION = "console/network"
4
5# some files are from other projects and have others license terms:
6# public domain, OpenSSH 3.5p1, OpenSSH3.6.1p2, PuTTY
7LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=3a5b0c2f0d0c49dfde9558ae2036683c"
9
10DEPENDS = "zlib"
11PROVIDES = "ssh sshd"
12RPROVIDES = "ssh sshd"
13
14SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.gz \
15 file://urandom-xauth-changes-to-options.h.patch \
16 file://configure.patch \
17 file://fix-2kb-keys.patch \
18 file://allow-nopw.patch;apply=no \
19 file://init"
20
21inherit autotools update-rc.d
22
23INITSCRIPT_NAME = "dropbear"
24INITSCRIPT_PARAMS = "defaults 10"
25
26CFLAGS_prepend = " -I. "
27LD = "${CC}"
28
29SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
30BINCOMMANDS = "dbclient ssh scp"
31EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
32
33DISTRO_TYPE = "${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)}"
34
35do_configure_prepend() {
36 if [ "x${DISTRO}" != "xfamiliar" -a "${DISTRO_TYPE}" = "debug" ]; then
37 oenote "WARNING: applying allow-nopw.patch which allows password-less logins!"
38 patch -p1 < ${WORKDIR}/allow-nopw.patch
39 fi
40}
41
42do_install() {
43 install -d ${D}${sysconfdir} \
44 ${D}${sysconfdir}/init.d \
45 ${D}${sysconfdir}/default \
46 ${D}${sysconfdir}/dropbear \
47 ${D}${bindir} \
48 ${D}${sbindir} \
49 ${D}${localstatedir}
50
51 install -m 0755 dropbearmulti ${D}${sbindir}/
52 ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
53
54 for i in ${SBINCOMMANDS}
55 do
56 ln -s ./dropbearmulti ${D}${sbindir}/$i
57 done
58 cat ${WORKDIR}/init | sed -e 's,/etc,${sysconfdir},g' \
59 -e 's,/usr/sbin,${sbindir},g' \
60 -e 's,/var,${localstatedir},g' \
61 -e 's,/usr/bin,${bindir},g' \
62 -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/dropbear
63 chmod 755 ${D}${sysconfdir}/init.d/dropbear
64}
65
66pkg_postinst () {
67 update-alternatives --install ${bindir}/scp scp ${sbindir}/dropbearmulti 20
68 update-alternatives --install ${bindir}/ssh ssh ${sbindir}/dropbearmulti 20
69}
70
71pkg_postrm_append () {
72 if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
73 rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
74 fi
75 if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then
76 rm ${sysconfdir}/dropbear/dropbear_dss_host_key
77 fi
78 update-alternatives --remove ssh ${bindir}/dropbearmulti
79 update-alternatives --remove scp ${bindir}/dropbearmulti
80}