aboutsummaryrefslogtreecommitdiffstats
path: root/main/mosh/APKBUILD
blob: 386e084c37ac4d2a94313253040cb2c8b3e93298 (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: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=mosh
pkgver=1.3.0
pkgrel=1
pkgdesc="Mobile shell surviving disconnects with local echo and line editing"
url="https://mosh.org"
arch="all"
license="GPL3+"
depends="$pkgname-client $pkgname-server"
options="!check"
makedepends="ncurses-dev zlib-dev libressl-dev perl-dev perl-io-tty protobuf-dev
	automake autoconf libtool"
subpackages="$pkgname-doc $pkgname-client $pkgname-server
	$pkgname-bash-completion:bashcomp:noarch"
source="https://mosh.org/$pkgname-$pkgver.tar.gz
	disable-utf8-check.patch"

builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	cd "$builddir"
	./autogen.sh
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	install -Dm644 "$builddir"/conf/bash-completion/completions/mosh \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}

server() {
	replaces="mosh"
	pkgdesc="Mosh server"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/mosh-server \
		"$subpkgdir"/usr/bin/
}

client() {
	replaces="mosh"
	pkgdesc="Mosh client"
	depends="openssh-client perl-io-tty"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/mosh-client \
		"$subpkgdir"/usr/bin/
}

sha512sums="2b43e3e3fb2ccf6c29a889f10dfc0d5504dbca6fabaf10419f4e355e4b73d64cc1e632324e447b25ac24ee18bb88d8a9a23f9c4824b267343fb86e26e7d5c54b  mosh-1.3.0.tar.gz
3c3b60b9aa837d76e53855907c59c3b1648e3a2e166b3ec902aec117e4e56d850553a089401a3bb9901412c125d30d4dac76d204721a17286a0ddc922508f6fc  disable-utf8-check.patch"