archrelease: copy trunk to extra-x86_64
[arch-packages.git] / cbindgen / trunk / PKGBUILD
blobff6f5f1742a8772c4d3d3fe6104818176446d749
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
3 pkgname=cbindgen
4 pkgver=0.24.3
5 pkgrel=1
6 pkgdesc="A tool for generating C bindings to Rust code"
7 url="https://github.com/eqrion/cbindgen"
8 arch=(x86_64)
9 license=(MPL2)
10 depends=(gcc-libs)
11 makedepends=(cargo git)
12 checkdepends=(cython)
13 _commit=f43ccfc047a1a160267f32355c5e5e7154a2665a  # tags/v0.24.3^0
14 source=("git+$url#commit=$_commit")
15 sha512sums=('SKIP')
17 # Use LTO
18 export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
20 # Use debug
21 export CARGO_PROFILE_RELEASE_DEBUG=2
23 pkgver() {
24   cd cbindgen
25   git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
28 prepare() {
29   cd cbindgen
30   cargo fetch --locked --target x86_64-unknown-linux-gnu
33 build() {
34   cd cbindgen
35   cargo build --release --frozen --all-targets
38 check() {
39   cd cbindgen
40   # Tests need nightly features
41   RUSTC_BOOTSTRAP=1 cargo test --release --frozen
44 package() {
45   cd cbindgen
46   install -Dt "$pkgdir/usr/bin" target/release/cbindgen
47   install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 README.md