APKBUILD 1.09 KB
Newer Older
1 2 3
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=lz4
A. Klitzing's avatar
A. Klitzing committed
4
pkgver=1.8.2
Stuart Cardall's avatar
Stuart Cardall committed
5
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"
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"
Stuart Cardall's avatar
Stuart Cardall committed
12
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz"
A. Klitzing's avatar
A. Klitzing committed
13
builddir="$srcdir"/$pkgname-$pkgver
14

15 16 17 18
case "$CARCH" in
armhf) options="!check" ;; # FIXME
esac

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

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

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

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

A. Klitzing's avatar
A. Klitzing committed
41
sha512sums="5fadc79334d37739c947d6dfc24f48ce82989fc5ee4f2bb8201ccf7ee3230b9e6e7c8488beb64050a035369f4247161d258bdb539578bec224ccebfef1b8a763  lz4-1.8.2.tar.gz"