APKBUILD 1.25 KB
Newer Older
1 2 3
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=lz4
4
pkgver=1.8.3
5
pkgrel=2
6
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"
Sören Tempel's avatar
Sören Tempel committed
9
license="BSD-2-Clause GPL-2.0-only"
Stuart Cardall's avatar
Stuart Cardall committed
10
checkdepends="diffutils"
11
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-tests:tests"
12 13 14
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
	lift-XXH_FORCE_MEMORY_ACCESS-condition.patch
	"
A. Klitzing's avatar
A. Klitzing committed
15
builddir="$srcdir"/$pkgname-$pkgver
16 17

build() {
A. Klitzing's avatar
A. Klitzing committed
18
	cd "$builddir"
Stuart Cardall's avatar
Stuart Cardall committed
19 20 21 22 23
	make PREFIX="/usr"
}

check() {
	cd "$builddir"
24
	make check
Stuart Cardall's avatar
Stuart Cardall committed
25 26 27 28
}

tests() {
	cd "$builddir"/tests
Stuart Cardall's avatar
Stuart Cardall committed
29
	mkdir -p "$subpkgdir"/usr/share/$pkgname
Stuart Cardall's avatar
Stuart Cardall committed
30
	rm -f *.c COPYING Makefile .gitignore
Stuart Cardall's avatar
Stuart Cardall committed
31
	cp -rf "$builddir"/tests "$subpkgdir"/usr/share/$pkgname
32 33 34
}

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

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