aboutsummaryrefslogtreecommitdiffstats
path: root/community/shfmt/APKBUILD
blob: 08663283dfebbdd8fc024a76eb8e9f988417b47c (plain) (blame)
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
# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=shfmt
pkgver=3.1.2
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"
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
}

check() {
	go test ./...
}

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

sha512sums="6e367a7a05c5e18d6de7f822ef181443b22d05f94a5fe5a0cf4759bc1e4a07dfac0e2704eb3025868e0f44c0e04a9cbd28dfe5a977381b2ba6fe274ac97ef29a  shfmt-3.1.2.tar.gz"