summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel M. Dutra2023-09-05 13:16:01 -0300
committerGabriel M. Dutra2023-09-05 13:16:01 -0300
commitf78002b03c8f2e75491d6c76ed985a5daead21ce (patch)
treebc4c6abedfe7924d10a8e20428f2e31e3725cd55
downloadaur-f78002b03c8f2e75491d6c76ed985a5daead21ce.tar.gz
opentf-git: adding git version
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD28
2 files changed, 40 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8f24b2230209
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = opentf-git
+ pkgdesc = OSS tool for building, changing, and versioning infrastructure safely and efficiently.
+ pkgver = r31645.a7d8cdd
+ pkgrel = 1
+ url = https://github.com/opentffoundation/opentf
+ arch = x86_64
+ license = MPL2
+ makedepends = git
+ source = git+https://github.com/opentffoundation/opentf.git
+ sha256sums = SKIP
+
+pkgname = opentf-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..09b76fe1efde
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Gabriel M. Dutra <nulldutra@proton.me>
+
+pkgname=opentf-git
+pkgver=r31645.a7d8cdd
+pkgrel=1
+pkgdesc="OSS tool for building, changing, and versioning infrastructure safely and efficiently."
+url='https://github.com/opentffoundation/opentf'
+arch=('x86_64')
+license=('MPL2')
+makedepends=('git')
+source=("git+https://github.com/opentffoundation/opentf.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd opentf
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
+}
+
+build() {
+ cd opentf
+ CGO_ENABLED=0 go build -ldflags "-w -s" -o bin/ .
+}
+
+package() {
+ cd opentf
+ install -Dm755 bin/opentf "$pkgdir/usr/bin/opentf"
+}
+