pkgname=cbindgen pkgver=0.27.0 pkgrel=1 pkgdesc="A tool for generating C bindings to Rust code" arch=('x86_64') url="https://github.com/mozilla/cbindgen" license=('MPL-2.0') depends=('gcc-libs' 'glibc') makedepends=('rustc') source=(https://github.com/mozilla/cbindgen/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz) sha256sums=(af74dd0452ace58895088048873a765fffacc3ad55eea00c0f2999cc4bcf9b5d) prepare() { cd ${pkgname}-${pkgver} cargo fetch -v --locked } build() { cd ${pkgname}-${pkgver} export CARGO_PROFILE_RELEASE_DEBUG=2 export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 cargo build --release --frozen } package() { cd ${pkgname}-${pkgver} install -Dt ${pkgdir}/usr/bin target/release/cbindgen }