aboutsummaryrefslogtreecommitdiffstats
path: root/main/dropbear/APKBUILD
blob: dd098055728490a5fce1b0bc8e511f7bfbcf74cd (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Contributor: Carlo Landmeter <clandmeter at gmail>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dropbear
pkgver=2015.67
pkgrel=0
pkgdesc="small SSH 2 client/server designed for small memory environments"
url="http://matt.ucc.asn.au/dropbear/dropbear.html"
arch="all"
license='MIT'
depends=
makedepends="zlib-dev linux-headers"
subpackages="$pkgname-doc $pkgname-scp:_scp"
source="http://matt.ucc.asn.au/dropbear/releases/${pkgname}-${pkgver}.tar.bz2
dropbear.initd
dropbear.confd
dropbear-0.53.1-static_build_fix.patch"

_builddir="$srcdir"/$pkgname-$pkgver
_progs="dropbear dbclient dropbearkey dropbearconvert scp"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	patch -p1 -i "$srcdir"/dropbear-0.53.1-static_build_fix.patch
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		|| return 1
	make PROGRAMS="$_progs" MULTI=1 || return 1
}

package() {
	cd "$_builddir"
	make MULTI=1 DESTDIR="$pkgdir" install || return 1
	mkdir "$pkgdir"/usr/sbin/
	for i in $_progs; do
		case $i in
		dropbear) ln -s ../bin/dropbearmulti "$pkgdir"/usr/sbin/$i;;
		*) ln -s dropbearmulti "$pkgdir"/usr/bin/$i;;
		esac
	done
	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
}

_scp() {
	pkgdesc="Dropbear scp support"
	depends="dropbear"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/scp "$subpkgdir"/usr/bin/
}

md5sums="e967e320344cd4bfebe321e3ab8514d6  dropbear-2015.67.tar.bz2
9b5c5b9e270aadc4199c272664f5d885  dropbear.initd
af73c487e2be37d65d0e8bf80489357e  dropbear.confd
d33de2027d5dc851762b65b276f1ac83  dropbear-0.53.1-static_build_fix.patch"
sha256sums="7e690594645dfde5787065c78a5d2e4d15e288babfa06e140197ce05f698c8e5  dropbear-2015.67.tar.bz2
3ef52a3d1485404a5caefeebe2c90283a35ea297d4d051e0b4320efac323de4d  dropbear.initd
e891255a49d408eb11514662faa4d724a1df27cc2ee90268507dbd2573b67334  dropbear.confd
c3bfdde97dc6306c8472d4b58fef874759a52d181eab1ef40363fec849a5d5d7  dropbear-0.53.1-static_build_fix.patch"
sha512sums="6a23f7dbe8ccd39683488a16ce4db39cdba529e9d302165742eb818d3cf520a3793660ff6c8ce0520ddb87dcac726ff34ed3dbcb7efa83115deafad2c6c0a5f3  dropbear-2015.67.tar.bz2
148bd8740a4d60d4cde5f97515e1130081460ef10b5c022d4ccf0b19ab3225a2705dcbd8e4545ef0a14eeee1098d8005aecce1f5b6c7c7110bfe7e19db3cea43  dropbear.initd
83f2c1eaf7687917a4b2bae7d599d4378c4bd64f9126ba42fc5d235f2b3c9a474d1b3168d70ed64bb4101cc251d30bc9ae20604da9b5d819fcd635ee4d0ebb0f  dropbear.confd
c9b0f28eb9653de21da4e8646fc27870a156112bce3d8a13baa6154ebf4baada3dee4f75bd5fdf5b6cd24a43fb80fb009e917d139d9e65d35118b082de0ebfbf  dropbear-0.53.1-static_build_fix.patch"