pkgname=zstd pkgver=1.5.6 pkgrel=1 pkgdesc='Zstandard is a real-time compression algorithm, providing high compression ratios.' arch=('x86_64') url='https://facebook.github.io/zstd/' license=('BSD' 'GPL2') depends=('lz4' 'xz' 'zlib') makedepends=('googletest' 'cmake') source=("https://github.com/facebook/zstd/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz") sha256sums=('8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1') build() { cmake -B build -S ${pkgname}-${pkgver}/build/cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DZSTD_BUILD_CONTRIB=ON \ -DZSTD_LZ4_SUPPORT=ON \ -DZSTD_LZMA_SUPPORT=ON \ -DZSTD_ZLIB_SUPPORT=ON \ -DZSTD_BUILD_TESTS=ON cmake --build build } package() { DESTDIR=${pkgdir} cmake --install build install -Dm644 ${pkgname}-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE }