pkgname=rust-bindgen pkgver=0.71.1 pkgrel=1 pkgdesc="Automatically generates Rust FFI bindings to C (and some C++) libraries" arch=('x86_64') url="https://github.com/rust-lang/rust-bindgen" license=('BSD') depends=('gcc-libs' 'clang') makedepends=('rustc') source=(https://github.com/rust-lang/rust-bindgen/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz) sha256sums=(620d80c32b6aaf42d12d85de86fc56950c86b2a13a5b943c10c29d30c4f3efb0) prepare() { cd ${pkgname}-${pkgver} cargo fetch -v --locked } build() { cd ${pkgname}-${pkgver} cargo build --release --frozen } package() { cd ${pkgname}-${pkgver} install -Dm755 target/release/bindgen ${pkgdir}/usr/bin/bindgen install -vdm755 ${pkgdir}/usr/share/bash-completion/completions ${pkgdir}/usr/bin/bindgen --generate-shell-completions bash > ${pkgdir}/usr/share/bash-completion/completions/bindgen install -vdm755 ${pkgdir}/usr/share/zsh/site-functions ${pkgdir}/usr/bin/bindgen --generate-shell-completions zsh > ${pkgdir}/usr/share/zsh/site-functions/_bindgen }