summaryrefslogtreecommitdiffstats
path: root/main/dropbear/APKBUILD
blob: f798d43185a34ed68e7ecdb7042df66d4d8b14d4 (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
# Contributor: Carlo Landmeter <clandmeter at gmail>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dropbear
pkgver=2013.58
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"
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
}

md5sums="8d3579bbbfcea48404a3219643076450  dropbear-2013.58.tar.bz2
d181e2234f34ae5b1e45f8ebf5f14e07  dropbear.initd
af73c487e2be37d65d0e8bf80489357e  dropbear.confd
d33de2027d5dc851762b65b276f1ac83  dropbear-0.53.1-static_build_fix.patch"
sha256sums="d866189b1d14e15353aeb4feb616f6132a63ea7c25ca8aa12b63a3a397822e55  dropbear-2013.58.tar.bz2
0cf1bcfd3dc11612190b4dadea3cf0cbeb822bd53e5aa8229e6387ac83e88363  dropbear.initd
e891255a49d408eb11514662faa4d724a1df27cc2ee90268507dbd2573b67334  dropbear.confd
c3bfdde97dc6306c8472d4b58fef874759a52d181eab1ef40363fec849a5d5d7  dropbear-0.53.1-static_build_fix.patch"
sha512sums="8b1c46d41642e0cf75e9e290695416c4577ef6ef740c2b28cf67df29f0f72a096e8a38ff67db307b4235cc2735d98a2a563c38539acbfaa60e73a41b9a1bae7f  dropbear-2013.58.tar.bz2
3d887c2851ba36e969c315c5351cc2c39a0c9b7f92d080de22bc776c5d948916257b0eac0f71669916960268294d8bd2df5ff898ea1f94cc93b16e6d53973513  dropbear.initd
83f2c1eaf7687917a4b2bae7d599d4378c4bd64f9126ba42fc5d235f2b3c9a474d1b3168d70ed64bb4101cc251d30bc9ae20604da9b5d819fcd635ee4d0ebb0f  dropbear.confd
c9b0f28eb9653de21da4e8646fc27870a156112bce3d8a13baa6154ebf4baada3dee4f75bd5fdf5b6cd24a43fb80fb009e917d139d9e65d35118b082de0ebfbf  dropbear-0.53.1-static_build_fix.patch"