# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=lz4
epoch=1
pkgver=1.9.4
pkgrel=3
pkgdesc='Extremely fast compression algorithm'
arch=('x86_64')
url='https://lz4.github.io/lz4/'
license=('GPL2')
makedepends=('git' 'cmake' 'ninja')
checkdepends=('diffutils')
depends=('glibc')
source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver")
sha256sums=('SKIP')

build() {
  cmake -B build -S "$pkgname"/build/cmake \
    -G Ninja \
    -DCMAKE_BUILD_TYPE='None' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -Wno-dev
  cmake --build build
}

check() {
  rm -f passwd.lz4
  build/lz4 /etc/passwd passwd.lz4
  build/lz4 -d passwd.lz4 passwd
  diff -q /etc/passwd passwd
  rm passwd
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}

# vim:set ts=2 sw=2 et:
