diff options
author | ObserverOfTime | 2020-12-17 01:24:50 +0200 |
---|---|---|
committer | ObserverOfTime | 2020-12-17 01:24:50 +0200 |
commit | 38cb9cd8d03d7400efcbeaeaf5f54ad1cd5c2e2b (patch) | |
tree | c5f6efd1b1594bedfb169d59744f59f946964cbf | |
download | aur-38cb9cd8d03d7400efcbeaeaf5f54ad1cd5c2e2b.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 51 |
2 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1b392e1d7a74 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = zstd-cmake + pkgdesc = Zstandard - Fast real-time compression algorithm (with cmake files) + pkgver = 1.4.5 + pkgrel = 1 + url = https://www.zstd.net/ + arch = x86_64 + license = BSD + license = GPL2 + checkdepends = gtest + makedepends = cmake + depends = zlib + depends = xz + depends = lz4 + provides = zstd=1.4.5 + provides = zstd-static=1.4.5 + conflicts = zstd + conflicts = zstd-static + conflicts = zstd-git + options = staticlibs + source = https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz + sha256sums = 98e91c7c6bf162bf90e4e70fdbc41a8188b9fa8de5ad840c401198014406ce9e + +pkgname = zstd-cmake + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3f37a61e911b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: ObserverOfTime <chronobserver@disroot.org> +# Based on zstd + +pkgname=zstd-cmake +pkgver=1.4.5 +pkgrel=1 +pkgdesc='Zstandard - Fast real-time compression algorithm (with cmake files)' +arch=(x86_64) +url='https://www.zstd.net/' +license=('BSD' 'GPL2') +options=('staticlibs') +depends=('zlib' 'xz' 'lz4') +makedepends=('cmake') +checkdepends=('gtest') +provides=("zstd=${pkgver}" "zstd-static=${pkgver}") +conflicts=('zstd' 'zstd-static' 'zstd-git') +source=("https://github.com/facebook/zstd/releases/download/v${pkgver}/zstd-${pkgver}.tar.gz") +sha256sums=('98e91c7c6bf162bf90e4e70fdbc41a8188b9fa8de5ad840c401198014406ce9e') + +prepare() { + cd zstd-${pkgver} + patch -d build/cmake CMakeLists.txt -p1 <<'EOF' +10c10 +< cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR) +--- +> cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +EOF +} + +build() { + cd zstd-${pkgver} + cmake -B ../builddir \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib build/cmake + cmake --build ../builddir + make -C contrib/pzstd +} + +check() { + cd zstd-${pkgver} + make check + make -C contrib/pzstd test +} + +package() { + cd zstd-${pkgver} + install -Dm755 contrib/pzstd/pzstd "${pkgdir}/usr/bin/pzstd" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + DESTDIR="${pkgdir}" cmake --install ../builddir +} |