aports/community/swc/APKBUILD
2025-04-28 09:38:40 +00:00

37 lines
994 B
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=swc
pkgver=1.11.22
pkgrel=0
pkgdesc="A super-fast TypeScript / JavaScript compiler written in Rust"
url="https://swc.rs"
# riscv64: it would take eternity to build
arch="all !riscv64"
license="Apache-2.0"
makedepends="cargo cargo-auditable"
source="https://github.com/swc-project/swc/archive/v$pkgver/swc-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver/bindings"
# !check: TODO: run tests
# net: fetch dependencies
options="!check net"
prepare() {
default_prepare
# This is unwanted and breaks build on ARM.
rm ../.cargo/config.toml
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo auditable build -p swc_cli --release --frozen
}
package() {
install -D -m755 target/release/swc -t "$pkgdir"/usr/bin/
}
sha512sums="
e6191ba607dcd4eaedfcee0af4877113546fbd1e53320c7c6fac1cca4ad5a9b60359e4080ec7e592748c45158de90d445de218577f0fb066e6a7e3540727d27b swc-1.11.22.tar.gz
"