# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname=pixz
pkgver=1.0.6
pkgrel=0
pkgdesc="Parallel, indexed xz compressor"
url="https://github.com/vasi/pixz"
arch="all"
license="BSD-2-Clause"
depends=""
checkdepends="xz"
makedepends="libarchive-dev xz-dev
	automake autoconf libtool
	"
install=""
subpackages="$pkgname-doc"
source="https://github.com/vasi/pixz/releases/download/v$pkgver/pixz-$pkgver.tar.xz
	0001-use-posix-shell-for-tests.patch
	endian.patch
	"
builddir="$srcdir/pixz-$pkgver"

build() {
	cd "$builddir"
	autoreconf -vif
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

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

sha512sums="361a8d8b736c350e4e3fd19b5d36777129a087eb81439d05edc08f9378938583bef8fc70e440ffd22efb6dad1f6494c6c3e532d7dd1ab12c9350b6078aa993d7  pixz-1.0.6.tar.xz
f9333adaefb8f6bae4bc1841185f6289b362895c46702e213392aae4954ec2fe81d169a21fcd5eec2d0f96d243ec4add1f8ae89dc6480f603231c954da47d4ed  0001-use-posix-shell-for-tests.patch
8fc05d70837b3377ca09e0e1fc91d3a0998e49c710544e9ff0d04139a5400bb3d540375c02ebee849341981b23832a382cda85248e33d9cca9c99289c03cfa45  endian.patch"
