# Maintainer: PktSurf <smlinux@pktsurf.in>
app=sccache
version=0.3.3
build=1sml
homepage="https://github.com/mozilla/sccache"
download="https://github.com/mozilla/sccache/archive/refs/tags/v$version.tar.gz"
desc="Compile caching tool like ccache which can also cache rust objects"
requires="rust"

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

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

build() {
  cargo build \
    --release --frozen \
    --manifest-path Cargo.toml \
    --features native-zlib

  install -Dm 755 target/release/$app "$pkg/bin/$app"
  cp LICENSE $pkgdocs/

  mkfinalpkg
}

sha512sums="
d8431cd99d657c749437fe5816dce7c416ef5c93bd7a75d020c7ab77593e87b9c4600d3c3d338cd1e6fc5cd3e7fe1b236eb073f90f73e2ea4a649d1a9ffab53e  sccache-0.3.3.tar.lz
"
