APKBUILD 2.13 KB
Newer Older
1 2
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
Francesco Colista's avatar
Francesco Colista committed
3
pkgname=mosh
4
pkgver=1.3.2
5
pkgrel=9
Sören Tempel's avatar
Sören Tempel committed
6
pkgdesc="Mobile shell surviving disconnects with local echo and line editing"
Sören Tempel's avatar
Sören Tempel committed
7
url="https://mosh.org"
8
arch="all"
9
license="GPL-3.0-or-later"
10
depends="$pkgname-client $pkgname-server"
11
checkdepends="tmux perl"
12
makedepends="ncurses-dev zlib-dev openssl-dev perl-dev perl-io-tty
13
	protobuf-dev automake autoconf libtool gzip"
14 15 16
subpackages="$pkgname-doc $pkgname-client $pkgname-server
	$pkgname-bash-completion:bashcomp:noarch"
source="https://mosh.org/$pkgname-$pkgver.tar.gz
17
	fix-ppc64le-build-with-musl.patch"
18

Sören Tempel's avatar
Sören Tempel committed
19
builddir="$srcdir"/$pkgname-$pkgver
Sören Tempel's avatar
Sören Tempel committed
20

21 22
prepare() {
	default_prepare
23 24
	# Test unicode-later-combining is failing. Ideally we want to fix it.
	sed -i '/unicode-later-combining.test/d' "$builddir"/src/tests/Makefile.am
Sören Tempel's avatar
Sören Tempel committed
25
	cd "$builddir"
26
	./autogen.sh
Sören Tempel's avatar
Sören Tempel committed
27 28 29 30
}

build() {
	cd "$builddir"
Sören Tempel's avatar
Sören Tempel committed
31 32 33 34 35 36
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
37 38 39
		--localstatedir=/var \
		--enable-compile-warnings=error \
		--enable-examples
40
	make
Francesco Colista's avatar
Francesco Colista committed
41 42
}

43 44 45 46 47
check() {
	cd "$builddir"
	make distcheck VERBOSE=1 V=1
}

Francesco Colista's avatar
Francesco Colista committed
48
package() {
Sören Tempel's avatar
Sören Tempel committed
49
	cd "$builddir"
50
	make DESTDIR="$pkgdir" install
Francesco Colista's avatar
Francesco Colista committed
51 52
}

53 54 55 56 57 58
bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

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

62 63 64
server() {
	replaces="mosh"
	pkgdesc="Mosh server"
65
	depends=""
66 67
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/mosh-server \
68
		"$subpkgdir"/usr/bin/
69 70 71 72 73 74 75 76
}

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

80
sha512sums="f400e8fe7ba2ab7362311fc12a00ec69587505f901988aeee500fc68d38a388218500a3f602111c883ff23a9d43572114fcf0a8bf505df203691e5b597615769  mosh-1.3.2.tar.gz
81
a276dde98a2dab63ad9c9c05468c55983a95f482878c5694713810b561eae1ea5618efc72431a17ee5b5014b12ee9709c6a8cbf582620294e7888cc837cd073c  fix-ppc64le-build-with-musl.patch"