summaryrefslogtreecommitdiff
path: root/opt/shfmt/MAKEPKG
diff options
context:
space:
mode:
Diffstat (limited to 'opt/shfmt/MAKEPKG')
-rw-r--r--opt/shfmt/MAKEPKG28
1 files changed, 28 insertions, 0 deletions
diff --git a/opt/shfmt/MAKEPKG b/opt/shfmt/MAKEPKG
new file mode 100644
index 0000000..d57b1c3
--- /dev/null
+++ b/opt/shfmt/MAKEPKG
@@ -0,0 +1,28 @@
+#!/bin/mkpkg
+# description: A shell formatter (sh/bash/mksh)
+# url: https://github.com/mvdan/sh
+
+name=shfmt
+version=3.14.1
+release=1
+makedeps=(go)
+source=(https://github.com/mvdan/sh/archive/refs/tags/v${version}.tar.gz)
+renames=(${name}-${version}.tar.gz)
+sha256sums=(
+ "ec4bdb88ab6c95686be3a4eeb4ad77d2b49d33d2ed7b0a65035cd52d2d87c443"
+)
+
+build() {
+ cd sh-${version}
+
+ export GOFLAGS="-trimpath -mod=readonly -ldflags=-s -ldflags=-w"
+ export CGO_ENABLED=0 # static binary, no libc dependency
+
+ cd cmd/shfmt
+ go build -o $PKG/usr/bin/shfmt .
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}