# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=pv
pkgver=1.9.31
pkgrel=1
pkgdesc="CLI tool for monitoring the progress of data through a pipeline"
url="https://www.ivarch.com/programs/pv.shtml"
arch="all"
license="Artistic-2.0"
subpackages="$pkgname-doc"
source="https://www.ivarch.com/programs/sources/pv-$pkgver.tar.gz"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-nls
	make
}

check() {
	# IPC tests fail when running in parallel
	make -j1 check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
63cdc6223cde4f3f0daf47b5808a3f72a9cfaf2c05751e971a99d9dd3df2f36430958213c023931f428c87341a5f6c1f3772f30ca992123ea4c2a2e48000ff1d  pv-1.9.31.tar.gz
"
