aboutsummaryrefslogtreecommitdiffstats
path: root/main/dropbear/APKBUILD
blob: b274a47bd85e13dda853ae808df3597e94e28eb8 (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=2014.66
pkgrel=1
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="c21a01111aa5015db038c6efdb85717d  dropbear-2014.66.tar.bz2
9b5c5b9e270aadc4199c272664f5d885  dropbear.initd
af73c487e2be37d65d0e8bf80489357e  dropbear.confd
d33de2027d5dc851762b65b276f1ac83  dropbear-0.53.1-static_build_fix.patch"
sha256sums="ab3fe2670a517cc0bbe398ff5d15e9ca12cd14f2fc18930a8111ae2baa64ab76  dropbear-2014.66.tar.bz2
3ef52a3d1485404a5caefeebe2c90283a35ea297d4d051e0b4320efac323de4d  dropbear.initd
e891255a49d408eb11514662faa4d724a1df27cc2ee90268507dbd2573b67334  dropbear.confd
c3bfdde97dc6306c8472d4b58fef874759a52d181eab1ef40363fec849a5d5d7  dropbear-0.53.1-static_build_fix.patch"
sha512sums="3005f754ad97e5eb84221740577f4dd962e38f38b3f6ba84dbb0811a7a35d487069c35b30055e129541c224769fe0a7e594084a9b0f1cc667029ad43d4988149  dropbear-2014.66.tar.bz2
148bd8740a4d60d4cde5f97515e1130081460ef10b5c022d4ccf0b19ab3225a2705dcbd8e4545ef0a14eeee1098d8005aecce1f5b6c7c7110bfe7e19db3cea43  dropbear.initd
83f2c1eaf7687917a4b2bae7d599d4378c4bd64f9126ba42fc5d235f2b3c9a474d1b3168d70ed64bb4101cc251d30bc9ae20604da9b5d819fcd635ee4d0ebb0f  dropbear.confd
c9b0f28eb9653de21da4e8646fc27870a156112bce3d8a13baa6154ebf4baada3dee4f75bd5fdf5b6cd24a43fb80fb009e917d139d9e65d35118b082de0ebfbf  dropbear-0.53.1-static_build_fix.patch"