contrib/cargo-c/Pkgfile

20 lines
674 B
Plaintext
Raw Normal View History

# Description: A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries
# URL: https://github.com/lu-zero/cargo-c/
# Maintainer: Tim Biermann, tbier at posteo dot de
2023-02-25 20:04:04 +01:00
# Depends on: libgit2 rust
name=cargo-c
2024-06-18 06:54:08 +02:00
version=0.10.0
2023-03-12 14:40:12 +01:00
release=1
source=(https://github.com/lu-zero/cargo-c/archive/v$version/$name-$version.tar.gz)
build() {
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
[[ ! -e $PKGMK_SOURCE_DIR/rust ]] && mkdir $PKGMK_SOURCE_DIR/rust
export CFLAGS+=' -ffat-lto-objects'
cargo build --release --manifest-path $name-$version/Cargo.toml
cargo install --offline --no-track --path $name-$version --root $PKG/usr
}