1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
6 pkgdesc="A tool for generating C bindings to Rust code"
7 url="https://github.com/eqrion/cbindgen"
11 makedepends=(cargo git)
13 _commit=f43ccfc047a1a160267f32355c5e5e7154a2665a # tags/v0.24.3^0
14 source=("git+$url#commit=$_commit")
18 export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
21 export CARGO_PROFILE_RELEASE_DEBUG=2
25 git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
30 cargo fetch --locked --target x86_64-unknown-linux-gnu
35 cargo build --release --frozen --all-targets
40 # Tests need nightly features
41 RUSTC_BOOTSTRAP=1 cargo test --release --frozen
46 install -Dt "$pkgdir/usr/bin" target/release/cbindgen
47 install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 README.md