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)
14 _commit=f43ccfc047a1a160267f32355c5e5e7154a2665a # tags/v0.24.3^0
15 source=("git+$url#commit=$_commit")
19 export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
22 export CARGO_PROFILE_RELEASE_DEBUG=2
26 git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
31 cargo fetch --locked --target x86_64-unknown-linux-gnu
36 cargo build --release --frozen --all-targets
41 # Tests need nightly features
42 RUSTC_BOOTSTRAP=1 cargo test --release --frozen
47 install -Dt "$pkgdir/usr/bin" target/release/cbindgen
48 install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 README.md