summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDasith Gunawardhana2019-05-11 16:29:18 -0700
committerDasith Gunawardhana2019-05-11 16:29:18 -0700
commit3f3b2f9e586d42bc05aacf5bf915be581098ebca (patch)
tree8c49ac23c95b0508a4b68bdc9e09b567df2c9bd0
downloadaur-3f3b2f9e586d42bc05aacf5bf915be581098ebca.tar.gz
initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD51
2 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bfa78abee193
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = nomad-git
+ pkgdesc = Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
+ pkgver = v0.9.0_451_g9b6e5c1fd
+ pkgrel = 1
+ url = https://www.nomadproject.io/
+ arch = x86_64
+ license = MPL2
+ makedepends = go
+ makedepends = git
+ depends = glibc
+ provides = nomad
+ conflicts = nomad
+ source = git+https://github.com/hashicorp/nomad.git
+ sha256sums = SKIP
+
+pkgname = nomad-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..277407ccf295
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Dasith Gunawardhana <dasith.gunawardhana@gmail.com>
+
+_pkgname=nomad
+pkgname=${_pkgname}-git
+pkgver=v0.9.0_451_g9b6e5c1fd
+pkgrel=1
+pkgdesc="Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations."
+arch=('x86_64')
+url="https://www.nomadproject.io/"
+license=('MPL2')
+depends=('glibc')
+makedepends=('go' 'git')
+conflicts=("${_pkgname}")
+provides=("${_pkgname}")
+source=("git+https://github.com/hashicorp/nomad.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd ${_pkgname}
+ git describe | sed 's/[- ]/_/g'
+}
+
+prepare() {
+ mkdir -p gopath/src/github.com/hashicorp
+ ln -rTsf ${_pkgname} gopath/src/github.com/hashicorp/${_pkgname}
+ export GOPATH="$srcdir"/gopath
+
+ cd gopath/src/github.com/hashicorp/${_pkgname}
+ make bootstrap
+}
+
+build() {
+ export GOPATH="$srcdir"/gopath
+ export GOFLAGS="-gcflags=all=-trimpath=${PWD} -asmflags=all=-trimpath=${PWD} -ldflags=-extldflags=-zrelro -ldflags=-extldflags=-znow"
+
+ cd gopath/src/github.com/hashicorp/${_pkgname}
+ make dev
+}
+
+# check() {
+# export GOPATH="$srcdir"/gopath
+
+# cd gopath/src/github.com/hashicorp/${_pkgname}
+# make test
+# }
+
+package() {
+ cd gopath/src/github.com/hashicorp/${_pkgname}
+ install -Dm755 bin/nomad "$pkgdir"/usr/bin/nomad
+ install -m644 -D LICENSE "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
+}