makedepends=(protobuf ncurses openssh perl-io-tty libutempter git)

description="Mobile shell, surviving disconnects with local echo and line editing."
url="http://mosh.mit.edu/"

packager="Great-OS Team"
maintainer="Great-OS Team"

name=mosh
version=1.4.0
_commit=1105d481bb9143dad43adf768f58da7b029fd39c
release=10

source=()

prepare() {
  git clone https://github.com/mobile-shell/$name $name-$version
  cd $name-$version
  git checkout ${_commit}
}

build() {
  
  cd $name-$version

  ./autogen.sh
  ./configure --prefix=/usr \
              --libdir=/usr/lib \
              --sysconfdir=/etc/mosh

  make
}

package() {
  
  cd $name-$version

  make DESTDIR=$PKG install

  install -Dm644 "conf/bash-completion/completions/$name" \
    "$PKG/usr/share/bash-completion/completions/$name"
}
