APKBUILD 1.44 KB
Newer Older
1 2 3
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=lz4
Stuart Cardall's avatar
Stuart Cardall committed
4
pkgver=1.8.0
5 6
pkgrel=0
pkgdesc="LZ4 is lossless compression algorithm with fast decoder @ multiple GB/s per core."
A. Klitzing's avatar
A. Klitzing committed
7
url="https://github.com/lz4/lz4"
8
arch="all"
A. Klitzing's avatar
A. Klitzing committed
9
license="BSD"
Stuart Cardall's avatar
Stuart Cardall committed
10 11 12 13 14 15
checkdepends="diffutils"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-tests::tests"
source="$pkgname-$pkgver.tar.gz::https://github.com/lz4/lz4/archive/v$pkgver.tar.gz
	parallel-tests.patch
	fix-man-dir.patch
	"
A. Klitzing's avatar
A. Klitzing committed
16
builddir="$srcdir"/$pkgname-$pkgver
17 18

build() {
A. Klitzing's avatar
A. Klitzing committed
19
	cd "$builddir"
Stuart Cardall's avatar
Stuart Cardall committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
	make PREFIX="/usr"
}

check() {
	cd "$builddir"
	# too many parallel processes cause tests to fail
	# https://github.com/lz4/lz4/issues/385#issuecomment-323869527
	make -j4 test
}

tests() {
	cd "$builddir"/tests
	mkdir -p "$subpkgdir"/usr/share/lz4
	rm -f *.c COPYING Makefile .gitignore
	cp -rf "$builddir"/tests "$subpkgdir"/usr/share/lz4
35 36 37
}

package() {
A. Klitzing's avatar
A. Klitzing committed
38
	cd "$builddir"
Stuart Cardall's avatar
Stuart Cardall committed
39
	make PREFIX="/usr" DESTDIR="$pkgdir" install
40 41
}

Stuart Cardall's avatar
Stuart Cardall committed
42 43 44
sha512sums="aea46d4a900a3ede7dd7b498ee938ecd98397d3277c5b3a85b4236a44777cba85cd68a2f32c993b872afda96c5dafe0cb3dd391101fe8181e17c9f48884c1535  lz4-1.8.0.tar.gz
b22ca4422b621d9cf0d9ad0786ac28966d50bf502c067a5902b7f89527529e8c895bfbafd349fb0729aa2dbb3687bbb4b4d669d18bb4c6cc80118f31453369cc  parallel-tests.patch
6c00f7257437a110aea6490e6261fc97aa15f80ff923285bbe2948ca4a3069949473b304980e9b089da41219f471ea7ce9104a6e714b3b2732a230d3191beb62  fix-man-dir.patch"