aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shfmt/APKBUILD
blob: 08d7fc2670ab342be69080625d54c285ef55ccfd (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.2
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="1f513b4629a472a08c4dbc5d788b4cd619197e27a5814de0ac8863629ed5598a715b7106a59fda2c64725c4f896a2c0889c1522b92324d0c1cfc80596d237fd4  shfmt-3.0.2.tar.gz"