mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-06 04:04:17 +02:00
62 lines
1.7 KiB
Text
62 lines
1.7 KiB
Text
# Maintainer: qaqland <qaq@qaq.land>
|
|
pkgname=dprint
|
|
pkgver=0.49.1
|
|
pkgrel=0
|
|
pkgdesc="Pluggable and configurable code formatting platform written in Rust"
|
|
url="https://dprint.dev/"
|
|
arch="x86_64 aarch64" # limited by wasmer-vm
|
|
license="MIT"
|
|
makedepends="
|
|
cargo
|
|
cargo-auditable
|
|
clang-static
|
|
llvm19-dev
|
|
zstd-dev
|
|
"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
source="https://github.com/dprint/dprint/archive/$pkgver/dprint-$pkgver.tar.gz
|
|
01-fix-deno-test.patch
|
|
"
|
|
options="net" # cargo fetch
|
|
|
|
export ZSTD_SYS_USE_PKG_CONFIG=1 # use system zstd
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo auditable build -p dprint --frozen --release
|
|
|
|
./target/release/dprint completions bash > $pkgname.bash
|
|
./target/release/dprint completions fish > $pkgname.fish
|
|
./target/release/dprint completions zsh > $pkgname.zsh
|
|
}
|
|
|
|
check() {
|
|
cargo build --frozen
|
|
cargo test --frozen
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 target/release/dprint -t "$pkgdir"/usr/bin
|
|
|
|
install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
|
|
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
install -Dm644 $pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname
|
|
install -Dm644 $pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish
|
|
install -Dm644 $pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
|
|
}
|
|
|
|
sha512sums="
|
|
a7d1a9b9f734163b7f9a4718e591dcf991d4d3261493cee35cb26fde774f3f244b4ebef7a825e4776b15a956307d7e0694e0d7526b6d24103aaceb8f7d74668b dprint-0.49.1.tar.gz
|
|
058df79a3854d02fa17d158e1332558683bd8cabbf7f285ee99f5f174cce56d7f557957ef907ecb2944c5c60a348c2408ec4e5845f840ba55a024e024ea222d1 01-fix-deno-test.patch
|
|
"
|