# Contributor: Francesco Colista # Maintainer: Dan Theisen pkgname=mosh pkgver=1.4.0 pkgrel=0 pkgdesc="Mobile shell surviving disconnects with local echo and line editing" url="https://mosh.org" arch="all" license="GPL-3.0+" depends="$pkgname-client $pkgname-server perl" checkdepends="tmux perl" makedepends="ncurses-dev zlib-dev openssl-dev perl-dev perl-io-tty protobuf-dev automake autoconf libtool gzip" subpackages="$pkgname-doc $pkgname-client $pkgname-server $pkgname-bash-completion:bashcomp:noarch" source="https://github.com/mobile-shell/mosh/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz" prepare() { default_prepare # Test unicode-later-combining is failing. Ideally we want to fix it. sed -i '/unicode-later-combining.test/d' "$builddir"/src/tests/Makefile.am ./autogen.sh } build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --enable-examples make } check() { make check VERBOSE=1 V=1 } package() { 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" depends="" 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="38c11f52ff1e42965b50a22bf6de80b0fa8ebbff841d825e760abf69c788a2bf5f34e6f7fc047574d595118334eef9edf8da5520b52cdde3ac1a79d7ad70312e mosh-1.4.0.tar.gz"