contrib/cbindgen/Pkgfile

25 lines
557 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-04-16 17:18:50 +02:00
version=0.8.3
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
if [ -n "$(pkginfo -i | grep '^sccache ')" ]; then
export RUSTC_WRAPPER=/usr/bin/sccache
fi
export CARGO_HOME="$PKGMK_SOURCE_DIR"
cargo build --release
cargo install --root $PKG/usr
rm $PKG/usr/.crates.toml
}