pkgname=zstd
pkgver=1.5.7
pkgdesc='Zstandard - Fast real-time compression algorithm'
homepage='https://facebook.github.io/zstd/'
license=(
  BSD-3-Clause
  GPL-2.0-only
)
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://github.com/facebook/zstd/releases/download/v${pkgver}/${sources[0]}")
md5sums=("780fc1896922b1bc52a4e90980cdda48")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  make prefix=/usr
}

src_check() {
  make check
}

src_install() {
  make prefix="${pkgdir}/usr" install
  rm -v "${pkgdir}/usr/lib/libzstd.a"
}
