contrib/sccache/Pkgfile

28 lines
841 B
Plaintext
Raw Normal View History

2018-12-26 11:18:12 +01:00
# Description: Sccache is a ccache-like tool
# URL: https://github.com/mozilla/sccache
2023-05-23 18:25:49 +02:00
# Maintainer: Tim Biermann, tbier at posteo dot de
2018-12-26 11:18:12 +01:00
# Depends on: rust
name=sccache
2024-05-25 23:51:08 +02:00
version=0.8.1
2022-05-31 23:18:49 +02:00
release=1
2021-01-23 10:15:23 +01:00
source=(https://github.com/mozilla/sccache/archive/v$version/$name-v$version.tar.gz)
2018-12-26 11:18:12 +01:00
build() {
2023-05-23 18:25:49 +02:00
prt-get isinst sccache && export RUSTC_WRAPPER='/usr/bin/sccache'
mkdir "$PKGMK_SOURCE_DIR/rust" || true
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
2018-12-26 11:18:12 +01:00
2023-06-03 21:53:43 +02:00
export CFLAGS+=' -ffat-lto-objects'
export LDFLAGS+=' -lzstd'
2024-04-21 20:08:42 +02:00
#if [ $(uname -m) == "x86_64" ]; then
# PKGMK_SCCACHE+=',dist-server'
#fi
2024-01-10 19:57:30 +01:00
2023-05-23 18:25:49 +02:00
cargo build --manifest-path $name-$version/Cargo.toml --release \
2024-01-10 19:57:30 +01:00
--features native-zlib,all$PKGMK_SCCACHE
2023-05-23 18:25:49 +02:00
cargo install --path $name-$version --root $PKG/usr --no-track \
2024-01-10 19:57:30 +01:00
--frozen --offline --features native-zlib,all$PKGMK_SCCACHE
2018-12-26 11:18:12 +01:00
}