# Maintainer: poxu <poxvuibr@gmail.com>

pkgname=pv
pkgver=1.6.6
pkgrel=1
pkgdesc="Pipe viewer"
arch=('i686' 'x86_64')
url="https://www.ivarch.com/programs/pv.shtml"
license=('Artistic License 2.0')
depends=()
builddepends=()
source=(https://www.ivarch.com/programs/sources/pv-${pkgver}.tar.gz)
sha256sums=('94defb4183ae07c44219ba298d43c4991d6e203c29f74393d72ecad3b090508a')

build () {
  [ -d ${srcdir}/build-${CHOST} ] && rm -rf ${srcdir}/build-${CHOST}
  mkdir ${srcdir}/build-${CHOST} && cd ${srcdir}/build-${CHOST}
  
  ../${pkgname}-${pkgver}/configure \
    --prefix=/usr \
    --build=${CHOST} \
    --host=${CHOST} \

  make
}

check () {
    cd ${srcdir}/build-${CHOST}
    make test
}

package () {
  cd build-${CHOST}
  make prefix="${pkgdir}/usr" install
}
