contrib/cbindgen/Pkgfile
2018-12-26 21:32:04 +11:00

25 lines
557 B
Plaintext

# 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
version=0.6.7
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
}