# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

pkgname=tio
pkgver=1.32
pkgrel=1
pkgdesc="A simple TTY terminal I/O application"
arch=('i686' 'x86_64')
url="https://tio.github.io/"
license=('GPL')
source=(https://github.com/tio/tio/releases/download/v${pkgver}/tio-${pkgver}.tar.xz)
sha256sums=('a8f5ed6994cacb96780baa416b19e5a6d7d67e8c162a8ea4fd9eccd64984ae44')
validpgpkeys=('101BAC1C15B216DBE07A3EEA2BDB4A0944FA00B1') # Martin Lund

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  autoreconf -fiv
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}
