aboutsummaryrefslogtreecommitdiffstats
path: root/community/zstd/APKBUILD
blob: 868c4d12d24291b8fce85abeaecfbc66072387f6 (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
# Contributor: stef <l0ls0fo2i@ctrlc.hu>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=zstd
pkgver=1.3.8
pkgrel=0
pkgdesc="Zstandard - Fast real-time compression algorithm"
url="http://www.zstd.net"
arch="all !armhf"
license="BSD-3-Clause GPL-2.0-or-later"
checkdepends="file"
makedepends="grep"
subpackages="$pkgname-static $pkgname-libs $pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/facebook/zstd/archive/v$pkgver.tar.gz
	lift-XXH_FORCE_MEMORY_ACCESS-condition.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	unset CPPFLAGS
	make HAVE_PTHREAD=1 HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0 MOREFLAGS="-O2"
}

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

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

static() {
	pkgdesc="zstd static library"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}

sha512sums="834f7b6477c1e7d70f71105ea52be15c33866b48b93b7a3c6dff4f10c761e5ad35f3903899516317690a4b768051f6eedf7c030292f57cea5613d4017fab9466  zstd-1.3.8.tar.gz
4e577dc44f7b870ef55e179865e03a924f1cab5307367658e011f9868ef82562ca299e31411ef2ea15f0ac4247bcc5ce013a5c716479e08b34d0229d896aefc8  lift-XXH_FORCE_MEMORY_ACCESS-condition.patch"