mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-08 18:04:43 +02:00
38 lines
1 KiB
Text
38 lines
1 KiB
Text
# Contributor: Olliver Schinagl <oliver@schinagl.nl>
|
|
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
|
|
pkgname=shfmt
|
|
pkgver=3.11.0
|
|
pkgrel=0
|
|
pkgdesc="A shell parser, formatter, and interpreter (sh/bash/mksh)"
|
|
url="https://mvdan.cc/sh"
|
|
arch="all"
|
|
license="BSD-3-Clause"
|
|
makedepends="go scdoc"
|
|
subpackages="$pkgname-doc"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/mvdan/sh/archive/v$pkgver.tar.gz"
|
|
builddir="$srcdir/sh-$pkgver"
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
go build \
|
|
-ldflags "-X main.version=$pkgver-$pkgrel" \
|
|
-v \
|
|
./cmd/shfmt
|
|
scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1
|
|
}
|
|
|
|
check() {
|
|
go test ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 shfmt "$pkgdir"/usr/bin/shfmt
|
|
install -Dm644 shfmt.1 "$pkgdir"/usr/share/man/man1/shfmt.1
|
|
}
|
|
|
|
sha512sums="
|
|
eaa39732db8a9515bfd72ac5649021a1485545892a3b88e46f9188bd6311484eb864e21c593d57d0c7a9ee66e3ca2436187d5c7fc3148d897649870feb8f3d50 shfmt-3.11.0.tar.gz
|
|
"
|