summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Ambo2017-05-08 13:51:40 +0200
committerVincent Ambo2017-05-08 13:51:40 +0200
commit68c77ca1199e316d6dc8f9ea3a97aa1966435ab8 (patch)
tree2828d459944e4b7c0880c2cbbe6a22906bbecdbb
downloadaur-68c77ca1199e316d6dc8f9ea3a97aa1966435ab8.tar.gz
feat: initial PKGBUILD for kontemplate builds from master
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD38
2 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..2e6f1ddf193
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = kontemplate-git
+ pkgdesc = Simple Kubernetes resource templating
+ pkgver = master_1e3ecad
+ pkgrel = 1
+ url = https://github.com/tazjin/kontemplate
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ optdepends = pass: Template secrets into resources
+ source = kontemplate-git::git+https://github.com/tazjin/kontemplate.git
+ md5sums = SKIP
+
+pkgname = kontemplate-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e6b148b547f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Vincent Ambo <tazjin@gmail.com>
+pkgname=kontemplate-git
+pkgver=master_1e3ecad
+pkgrel=1
+pkgdesc="Simple Kubernetes resource templating"
+arch=('x86_64')
+url="https://github.com/tazjin/kontemplate"
+license=('MIT')
+makedepends=('go')
+optdepends=('pass: Template secrets into resources')
+source=('kontemplate-git::git+https://github.com/tazjin/kontemplate.git')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ echo -n "master_$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/$pkgname"
+ echo "Fetching Go dependencies..."
+ go get -v ./...
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+ local GIT_HASH="$(git rev-parse --short HEAD)"
+
+ go build -tags netgo \
+ -ldflags "-X main.gitHash=${GIT_HASH} -w -s" \
+ -o 'kontemplate'
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+
+ install -D -m 0755 'kontemplate' "${pkgdir}/usr/bin/kontemplate"
+}