# Maintainer: James Ross-Gowan <rossymiles@gmail.com>

pkgname=mosh
pkgver=1.3.2
pkgrel=2
pkgdesc="Mobile shell, surviving disconnects with local echo and line editing"
arch=('i686' 'x86_64')
url='https://mosh.mit.edu/'
groups=('net-utils')
license=('GPL3')
depends=('protobuf' 'ncurses' 'zlib' 'libopenssl' 'openssh' 'perl')
makedepends=('protobuf-devel' 'ncurses-devel' 'zlib-devel' 'openssl-devel' 'bash-completion')
source=("https://${pkgname}.mit.edu/${pkgname}-${pkgver}.tar.gz")
sha256sums=('da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216')
options=(!emptydirs)

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure \
    --host=${CHOST} \
    --prefix=/usr \
    --enable-completion
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
