aboutsummaryrefslogtreecommitdiffstats
path: root/main/lz4/APKBUILD
blob: 286998da040e1a4399df700d994091413acd6627 (plain) (blame)
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
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=lz4
pkgver=1.8.3
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-2-Clause GPL-2.0-only"
checkdepends="diffutils"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-tests:tests"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
	lift-XXH_FORCE_MEMORY_ACCESS-condition.patch
	"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	make PREFIX="/usr"
}

check() {
	cd "$builddir"
	case "$CARCH" in
	armel|armhf)	make check;;
	*)		make test;;
	esac
}

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

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

sha512sums="5d284f75a0c4ad11ebc4abb4394d98c863436da0718d62f648ef2e2cda8e5adf47617a4b43594375f7b0b673541a9ccfaf73880a55fd240986594558214dbf9f  lz4-1.8.3.tar.gz
9db6af6ed979782ded4794c6a4df20ab1397004d2ad5a09784b2ae4d70ed1d76c9f3417c01a4f4eb3c6ca54fb2363bf18a69a9e75012a5f0e7214fada071d4a0  lift-XXH_FORCE_MEMORY_ACCESS-condition.patch"