summaryrefslogtreecommitdiff
path: root/packaging/alpine
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-12-17 19:11:17 -0500
committerGitHub <noreply@github.com>2024-12-17 19:11:17 -0500
commita97ddf126b43165e9898798bbc3a1edd454d6b41 (patch)
treeffd387acfd8fc41166658987c3cc438968940bd7 /packaging/alpine
parentcec14a0d3eea073732cb9f093a4ee923c131a3ae (diff)
ci(fix): Attempt to fix release.yml (#2293)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'packaging/alpine')
-rw-r--r--packaging/alpine/APKBUILD.tmpl38
1 files changed, 38 insertions, 0 deletions
diff --git a/packaging/alpine/APKBUILD.tmpl b/packaging/alpine/APKBUILD.tmpl
new file mode 100644
index 00000000..38894597
--- /dev/null
+++ b/packaging/alpine/APKBUILD.tmpl
@@ -0,0 +1,38 @@
+# Maintainer: Dave Henderson <dhenderson@gmail.com>
+pkgname=gomplate
+pkgver={{.version}}
+pkgrel=0
+pkgdesc="A versatile Go template processor"
+url="https://github.com/hairyhenderson/gomplate"
+arch="all"
+license="MIT"
+depends="ca-certificates"
+makedepends="go"
+options="net"
+source="$pkgname-$pkgver.tar.gz::https://github.com/hairyhenderson/gomplate/archive/v$pkgver.tar.gz"
+
+export GOFLAGS="$GOFLAGS -trimpath -modcacherw"
+export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
+export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
+export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
+
+build() {
+ # CGO needs to be able to be enabled for -buildmode=pie, setting it to an
+ # empty string is a workaround for now.
+ # See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15809
+ make build \
+ CGO_ENABLED= \
+ VERSION="$pkgver" \
+ COMMIT="unknown"
+}
+
+check() {
+ # Note: make test (that runs go test -race) doesn't work.
+ go test -v
+}
+
+package() {
+ install -D -m 755 bin/gomplate "$pkgdir"/usr/bin/gomplate
+}
+
+sha512sums="{{.sha512}} gomplate-{{.version}}.tar.gz"