app=lz4
version=1.9.2
build=1sml
homepage="https://github.com/lz4/lz4"
download="https://github.com/lz4/lz4/archive/refs/tags/v$version.tar.gz"
desc="lossless compression algorithm"
requires="musl"

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version 
  fixbuilddirpermissions

  make -j1 \
    CFLAGS="$CFLAGS" \
    PREFIX="" \
    MANDIR="/share/man" \
    BUILD_STATIC=no \
    DESTDIR=$pkg default install

  cp LICENSE $pkgdocs/

  mkfinalpkg
}

sha512sums="
ae714c61ec8e33ed91359b63f2896cfa102d66b730dce112b74696ec5850e59d88bd5527173e01e354a70fbe8f036557a47c767ee0766bc5f9c257978116c3c1  lz4-1.9.2.tar.gz
"
