NAME="cbindgen"
DESC="Generate C bindings for rust code"
VERSION="0.26.0"

FILES=("https://github.com/eqrion/cbindgen/archive/v${VERSION}/cbindgen-${VERSION}.tar.gz")
HASHES=("b45e1a64875b615702a86ac3084ef69ae32926241cd2b687a30c12474be15105")

DEPENDS=("gcc-libs" "glibc")
BUILD=("cargo" "cmake" "python3")

PACKAGE() {
  tar xf "${NAME}-${VERSION}.tar.gz"
  cd "${NAME}-${VERSION}"

  cargo build --release
  mkdir -pv "${ROOTDIR}/usr/bin"
  install -Dm755 target/release/cbindgen "${ROOTDIR}/usr/bin/"

  cd .. && rm -r "${NAME}-${VERSION}"
}
