contrib/cbindgen/Pkgfile

24 lines
593 B
Plaintext
Raw Normal View History

2018-12-26 11:16:30 +01:00
# Description: Generate C bindings from rust code
# URL: https://github.com/eqrion/cbindgen
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: rust
# Optional: sccache
name=cbindgen
2019-11-22 14:26:11 +01:00
version=0.10.0
2018-12-26 11:16:30 +01:00
release=1
source=(https://github.com/eqrion/cbindgen/archive/v$version/$name-v$version.tar.gz)
build() {
cd $name-$version
2019-05-08 14:50:24 +02:00
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
2019-05-18 18:38:37 +02:00
mkdir "$PKGMK_SOURCE_DIR/rust" || true
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
2018-12-26 11:16:30 +01:00
2019-07-20 08:05:27 +02:00
cargo fetch
2018-12-26 11:16:30 +01:00
cargo build --release
2019-07-20 08:05:27 +02:00
cargo install --path . --root $PKG/usr
2018-12-26 11:16:30 +01:00
rm $PKG/usr/.crates.toml
}