blob: bd7b4b79680db2a42aa6f1edff468afa23e2c4ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: pinks <aur at papepati dot page>
pkgname=biome
pkgver=1.9.4
pkgrel=1
pkgdesc='Formatter, linter, and more for Javascript, Typescript, JSON, and CSS'
arch=(x86_64)
url=https://biomejs.dev
_url="https://github.com/biomejs/$pkgname"
license=(MIT)
depends=(gcc-libs
glibc)
makedepends=(cargo)
replaces=(rome)
_archive="$pkgname-cli-v$pkgver"
source=("$_url/archive/cli/v$pkgver/$_archive.tar.gz")
sha256sums=('fc06a89e1b925e8b1dfaca98f7af1d8e04d27acdcaeff786e2806f8bc26283f9')
prepare() {
cd "$_archive/crates/${pkgname}_cli"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
_srcenv() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
CFLAGS+=' -ffat-lto-objects'
}
build() {
_srcenv
cargo build -p "${pkgname}_cli" --frozen --release --all-features
}
check() {
_srcenv
local skipped=(
cases::diagnostics::max_diagnostics_verbose
commands::explain::explain_help
commands::lsp_proxy::lsp_proxy_help
)
cargo test -p "${pkgname}_cli" --frozen --all-features -- \
${skipped[@]/#/--skip }
}
package() {
cd "$_archive"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE-*
}
|