aports/community/sccache/APKBUILD
psykose 7853d213cc */*: remove CARGO_REGISTRIES_CRATES_IO_PROTOCOL
we now set this in abuild instead.
2023-05-06 04:28:28 +02:00

71 lines
1.6 KiB
Plaintext

# Contributor: psykose <alice@ayaya.dev>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=sccache
pkgver=0.4.2
pkgrel=0
pkgdesc="shared compilation cache for C/C++ and Rust"
url="https://github.com/mozilla/sccache/"
# s390x & riscv64: limited by cargo
# ppc64le: not supported by ring crate
# armhf: sigbus
arch="all !s390x !ppc64le !armhf !riscv64"
license="Apache-2.0"
makedepends="cargo openssl-dev>3"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/mozilla/sccache/archive/v$pkgver.tar.gz
test_musl_ldd_parse.patch
"
case "$CARCH" in
x86_64)
# only x86_64 supports sccache-dist
subpackages="$subpackages $pkgname-dist"
_features="all,dist-server"
;;
*)
_features="all"
;;
esac
prepare() {
default_prepare
cargo fetch --locked
}
build() {
cargo build --release --frozen --features $_features
}
check() {
cargo test --frozen
}
package() {
install -Dm0755 target/release/sccache -t "$pkgdir"/usr/bin
case "$CARCH" in
x86_64)
install -Dm0755 target/release/sccache-dist \
-t "$pkgdir"/usr/bin
;;
esac
install -Dm0644 -t "$pkgdir"/usr/share/doc/"$pkgname" \
docs/Distributed.md \
docs/DistributedQuickstart.md \
docs/Jenkins.md \
docs/Rust.md
}
dist() {
pkgdesc="$pkgdesc (dist server)"
amove usr/bin/sccache-dist
}
sha512sums="
7f2c089b74eb5e4f21883d52b1505d335721ec0a031c221a25388eb4e17f4426d3df5d005ee7e6438e7215a0691fba60db23e8f71d783734ee3829b93e59c9e0 sccache-0.4.2.tar.gz
d8e544829df05fd374518f7daa3fc09b129877288594aafedfa43aeaa358779475c763b58801a7591bc4dd5b555ec4326957df18628e661798c73c0dd6da3bec test_musl_ldd_parse.patch
"