summaryrefslogtreecommitdiffstats
path: root/main/dropbear
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/dropbear
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/dropbear')
-rw-r--r--main/dropbear/APKBUILD38
-rw-r--r--main/dropbear/dropbear.confd6
-rw-r--r--main/dropbear/dropbear.initd36
3 files changed, 80 insertions, 0 deletions
diff --git a/main/dropbear/APKBUILD b/main/dropbear/APKBUILD
new file mode 100644
index 000000000..ca4af482c
--- /dev/null
+++ b/main/dropbear/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Carlo Landmeter <clandmeter at gmail>
+pkgname=dropbear
+pkgver=0.52
+pkgrel=1
+pkgdesc="small SSH 2 client/server designed for small memory environments"
+url="http://matt.ucc.asn.au/dropbear/dropbear.html"
+license='MIT'
+depends="zlib"
+makedepends="zlib-dev"
+source="http://matt.ucc.asn.au/dropbear/releases/${pkgname}-${pkgver}.tar.bz2
+dropbear.initd
+dropbear.confd"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --disable-lastlog
+ progs="dbclient dropbearkey dropbearconvert scp"
+ make PROGRAMS="dropbear ${progs}" MULTI=1 || return 1
+ install -Dm755 "$srcdir/$pkgname-$pkgver"/dropbearmulti "$pkgdir"/usr/bin/dropbearmulti || return 1
+ cd "$pkgdir/usr/bin" || return 1
+ for i in ${progs}; do
+ msg "linking ${i##*/}"
+ ln -s dropbearmulti $i || return 1
+ done
+ msg "linking dropbear"
+ mkdir -p "$pkgdir"/usr/sbin || return 1
+ cd "$pkgdir/usr/sbin" || return 1
+ ln -s ../bin/dropbearmulti dropbear || return 1
+ install -D -m755 "$srcdir"/dropbear.initd "$pkgdir"/etc/init.d/dropbear || return 1
+ install -D -m644 "$srcdir"/dropbear.confd "$pkgdir"/etc/conf.d/dropbear || return 1
+}
+
+md5sums="a1fc7adf601bca53330a792a9c873439 dropbear-0.52.tar.bz2
+34fea1c967596ebcd6d10d38444f2b92 dropbear.initd
+af73c487e2be37d65d0e8bf80489357e dropbear.confd"
+
diff --git a/main/dropbear/dropbear.confd b/main/dropbear/dropbear.confd
new file mode 100644
index 000000000..555f275d9
--- /dev/null
+++ b/main/dropbear/dropbear.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/dropbear: config file for /etc/init.d/dropbear
+
+# see `dropbear -h` for more information
+# -w disables root logins
+# -p # changes the port number to listen on
+DROPBEAR_OPTS=""
diff --git a/main/dropbear/dropbear.initd b/main/dropbear/dropbear.initd
new file mode 100644
index 000000000..afdee8c6d
--- /dev/null
+++ b/main/dropbear/dropbear.initd
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/files/dropbear.init.d,v 1.2 2004/07/14 23:57:35 agriffis Exp $
+
+depend() {
+ use logger dns
+ need net
+}
+
+check_config() {
+ if [ ! -e /etc/dropbear/ ] ; then
+ mkdir /etc/dropbear/
+ fi
+ if [ ! -e /etc/dropbear/dropbear_dss_host_key ] ; then
+ einfo "Generating DSS-Hostkey..."
+ /usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
+ fi
+ if [ ! -e /etc/dropbear/dropbear_rsa_host_key ] ; then
+ einfo "Generating RSA-Hostkey..."
+ /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
+ fi
+}
+
+start() {
+ check_config || return 1
+ ebegin "Starting dropbear"
+ /usr/sbin/dropbear ${DROPBEAR_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dropbear"
+ start-stop-daemon --stop --pidfile /var/run/dropbear.pid
+ eend $?
+}