mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-17 22:15:17 +03:00
this does not download deps that won't be used for the default build target (the ctarget we are building for implicitly). this makes quite a few fetches faster.. because a ton of crates download a 10mb "windows-sys" that is never used, amongst other things. maybe breaks a thing or two.
39 lines
910 B
Text
39 lines
910 B
Text
# Contributor: Michał Polański <michal@polanski.me>
|
|
# Maintainer: Michał Polański <michal@polanski.me>
|
|
pkgname=rust-script
|
|
pkgver=0.22.0
|
|
pkgrel=0
|
|
pkgdesc="Run Rust files and expressions as scripts without any setup or compilation step"
|
|
url="https://rust-script.org/"
|
|
license="Apache-2.0 OR MIT"
|
|
arch="all !armhf" # tests hang
|
|
makedepends="cargo"
|
|
source="https://github.com/fornwall/rust-script/archive/$pkgver/rust-script-$pkgver.tar.gz"
|
|
|
|
case "$CARCH" in
|
|
riscv64)
|
|
options="$options textrels"
|
|
;;
|
|
esac
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo build --frozen --release
|
|
}
|
|
|
|
check() {
|
|
cargo test --frozen
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
|
|
}
|
|
|
|
sha512sums="
|
|
a5a30b6a9defcea6a60ff1b240fa1817dfafddd3e323c311acbc209bc89a41582f4bdd2168a190b81fa4c7c37177501a35348711e95234c16899fc7d82717444 rust-script-0.22.0.tar.gz
|
|
"
|