aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shfmt/APKBUILD
blob: dd730a01b178b2aa2601addaf1c40b586359d664 (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
# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname="shfmt"
pkgver=3.0.1
pkgrel=0
pkgdesc="A shell parser, formatter, and interpreter (sh/bash/mksh)"
url="https://mvdan.cc/sh"
arch="all"
license="BSD-3-Clause"
options="!check" # no test suite
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/mvdan/sh/archive/v$pkgver.tar.gz"
builddir="$srcdir/sh-$pkgver"

build() {
	go build \
		-ldflags "-w -X main.version=$pkgver-$pkgrel" \
		-v \
		./cmd/shfmt
}

package() {
	install -Dm755 -t "$pkgdir"/usr/bin \
		"$builddir"/shfmt
}

sha512sums="751a79c0e0da298613c135be1142a0ea34973467bb7db340ec756f4bd97daf09af459d97f43911804e19b2643b9ee78c607544bca7b8561d75acb374d2f533cf  shfmt-3.0.1.tar.gz"