# Maintainer: PktSurf <smlinux@pktsurf.in>
app=gtypist
version=2.9.5
build=1sml
homepage="https://www.gnu.org/savannah-checkouts/gnu/gtypist/gtypist.html"
download="http://ftp.gnu.org/gnu/gtypist/gtypist-2.9.tar.xz"
desc="Terminal-based universal typing tutor"
requires="netbsd-curses"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions

  applypatch $srcdir/ncurses.patch
  autoreconf -vif
}

build() {
  LDFLAGS="-lterminfo -lncurses" \
  ./configure \
    --prefix=

  make
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
397b2e7570f1702b1e355cf2e6ce8b0a78aa0f7e2493dcf0a39a07e1dc9e4c2bf01d16759dfcfffef3bb505b73435b6e4fb8e2565a20b7180a1867d4d3d68346  gtypist-2.9.5.tar.lz
84a29d4008f13ee0dc434b551b6846d94373679fa718d54a0cf52aeeaba8f1485e40d55f66c336bb33e23f1f939ea1711190c2a16903671febcdb191b4ffb94c  ncurses.patch
"
