# Contributor: stef # Maintainer: André Klitzing pkgname=zstd pkgver=1.4.4 pkgrel=0 pkgdesc="Zstandard - Fast real-time compression algorithm" url="https://www.zstd.net" arch="all" license="BSD-3-Clause GPL-2.0-or-later" checkdepends="file" makedepends="grep" subpackages="$pkgname-static $pkgname-libs $pkgname-dev $pkgname-doc" source="zstd-$pkgver.tar.gz::https://github.com/facebook/zstd/archive/v$pkgver.tar.gz " # secfixes: # 1.3.8-r0: # - CVE-2019-11922 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 armhf) return 0 ;; # Fail on CI 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="8209837e8eb14e474dfe21d5511085f46cef93b03ab77613fd41e7b8be652418231c38852669c8e0b55b78ad41ea2cb8008d0da122a83f8f27e32b5c86f045cf zstd-1.4.4.tar.gz"