APKBUILD 1015 Bytes
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 5
pkgver=1.8.1
pkgrel=0
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"
A. Klitzing's avatar
A. Klitzing committed
9
license="BSD"
Stuart Cardall's avatar
Stuart Cardall committed
10
checkdepends="diffutils"
11
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-tests:tests"
Stuart Cardall's avatar
Stuart Cardall committed
12
source="$pkgname-$pkgver.tar.gz::https://github.com/lz4/lz4/archive/v$pkgver.tar.gz"
A. Klitzing's avatar
A. Klitzing committed
13
builddir="$srcdir"/$pkgname-$pkgver
14 15

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

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

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

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

Stuart Cardall's avatar
Stuart Cardall committed
37
sha512sums="081d98af8be1e1cb7828607ae69fadfab8b1e55b754cc6531496edbd75c47e2879ef1676be9e2db9fb7bd361d2f27e7e4c028b08ee5ee783a0d51e171cadf734  lz4-1.8.1.tar.gz"