aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shfmt/APKBUILD
blob: 2c2753abbb2c6d90b2cc2aa2899cc2694db57005 (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
# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=shfmt
pkgver=3.1.0
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 shfmt "$pkgdir"/usr/bin/shfmt
}

sha512sums="ff6aed85f8b6959ea34a5029a584f5f1083ca9e09eca4c571a10dda05a65109a2307fd80564a1ddf28fee4dddd668986c407dfbed4fa361f8325399c2a3ae917  shfmt-3.1.0.tar.gz"