aboutsummaryrefslogtreecommitdiffstats
path: root/main/lz4/APKBUILD
blob: a4ee104f4a6c205480135278516b25021a9c45d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=lz4
pkgver=1.8.0
pkgrel=1
pkgdesc="LZ4 is lossless compression algorithm with fast decoder @ multiple GB/s per core."
url="https://github.com/lz4/lz4"
arch="all"
license="BSD"
options="!check"
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
	"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	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
}

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

sha512sums="aea46d4a900a3ede7dd7b498ee938ecd98397d3277c5b3a85b4236a44777cba85cd68a2f32c993b872afda96c5dafe0cb3dd391101fe8181e17c9f48884c1535  lz4-1.8.0.tar.gz
b22ca4422b621d9cf0d9ad0786ac28966d50bf502c067a5902b7f89527529e8c895bfbafd349fb0729aa2dbb3687bbb4b4d669d18bb4c6cc80118f31453369cc  parallel-tests.patch
6c00f7257437a110aea6490e6261fc97aa15f80ff923285bbe2948ca4a3069949473b304980e9b089da41219f471ea7ce9104a6e714b3b2732a230d3191beb62  fix-man-dir.patch"