# Description: build and install C-compatible libraries # URL: https://github.com/lu-zero/cargo-c # Maintainer: KRAK3N Team, extra ports at krak3n dot my # Depends on: rust name=cargo-c version=0.10.16 release=1 source=(https://github.com/lu-zero/${name}/archive/v${version}/${name}-${version}.tar.gz https://github.com/lu-zero/${name}/releases/download/v${version}/Cargo.lock) renames=(SKIP cargo-${version}.lock) build() { cd ${name}-${version} cp $SRC/cargo-${version}.lock Cargo.lock cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" --manifest-path Cargo.toml cargo build --release --frozen --manifest-path Cargo.toml rm target/release/cargo-*.d install -Dm755 target/release/cargo-* -t $PKG/usr/bin/ }