# Maintainer: PktSurf <smlinux@pktsurf.in>
app=cbindgen
version=0.24.3
build=1sml
homepage="https://github.com/eqrion/cbindgen"
download=""
desc="Tool for generating Rust headers from C code"
requires="rust"
   
prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

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

build() {
  RUSTONIG_DYNAMIC_LIBONIG=1 \
  cargo build --offline --release --target $arch-unknown-linux-musl $MAKEFLAGS
  install -Dm 755 target/$arch-unknown-linux-musl/release/cbindgen $pkg/bin/cbindgen

  cp LICENSE $pkgdocs/

  mkfinalpkg
}

sha512sums="
9bed6bb1d4f9829a94eadca36cb56e8d6a4065c632823fa910ef684708db9cf3983ab3b462dcf24f3291c689c2beac9a6ce6aad5682ebfbb86fe7259f6bcbd0c  cbindgen-0.24.3.tar.lz
"
