app=sccache
version=0.3.0
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"

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

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

  cargo build \
    --release \
    --manifest-path Cargo.toml \
    --features native-zlib

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

  mkfinalpkg
}

sha512sums="
82f09b15bcac300c22b4bab8b6d665ef5824af82d3e0fa198395fb7825c31da1eeb7ada1f39b0438efaf5760652f8977e50d1ca8f18770fe714c46f39840e67c  sccache-0.2.15.tar.gz
6cf82764b488e2092769a96a5d98c1fcc4969e228053684eb7e4c66c6262f5cdaa4f8a771a38026a4b2ff539304432f271f6cea51ebf31d7f67b9465f47eebfc  sccache-0.3.0.tar.gz
"