# Contributor: Matthias Neugebauer # Maintainer: Matthias Neugebauer pkgname=nomad pkgver=0.10.2 pkgrel=0 pkgdesc="An easy-to-use, flexible, and performant workload orchestrator" url="https://www.nomadproject.io/" arch="all" license="MPL-2.0" depends="cni-plugins" makedepends="linux-headers bash make go python2 yarn npm go-bindata-assetfs" subpackages="$pkgname-openrc" options="!check" # cannot produce environment for testing in CI source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/nomad/archive/v$pkgver.tar.gz nomad.initd nomad.confd nvidia-driver.patch server.hcl static-assets.patch ui-remove-husky.patch ui-upgrade-node-sass.patch" builddir="$srcdir/src/github.com/hashicorp/$pkgname" prepare() { mkdir -p "$srcdir/src/github.com/hashicorp" mv "$srcdir"/$pkgname-$pkgver "$builddir"/ default_prepare } build() { make ember-dist GOPATH="$srcdir" CGO_ENABLED=1 GO_TAGS="ui release" make static-assets GOPATH="$srcdir" CGO_ENABLED=1 go build -v -o bin/$pkgname \ -ldflags "-X github.com/hashicorp/nomad/version.GitCommit='$pkgver'" \ -tags "ui release" } check() { GOPATH="$srcdir" CGO_ENABLED=1 go test -timeout=15m "./..." } package() { install -m755 -D "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname" install -m644 -D "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname" install -m750 -o root -g root -D bin/$pkgname "$pkgdir/usr/sbin/$pkgname" install -m640 -o root -g root -D "$srcdir/server.hcl" "$pkgdir/etc/nomad.d/server.hcl" install -m750 -o root -g root -d "$pkgdir/var/lib/$pkgname" } sha512sums="6da8398552b60d79196a83f2f4bbc8f9751d9c29dcc01206b4da9ea6746ec92875d49400630c4a993706682bedb7c8eac7a2e3d96a8ac62d2ee38d22889d7c15 nomad-0.10.2.tar.gz ac969c81150ba57871c1f75f17c11d06ffc7bcc872882416c7c0d9d43f5e352ca1b7e7bfd75e32a9d01a826496c77a657dc298f5e048f85b4d9e85bc3afee51d nomad.initd a4fcc9f319926e8e5257dcc902cf3e1cbacd8bee82097b7a9719611d52037431a7e953a4b0fa90fc25475d2590cd14877c8e4c87bd909dd0099a754ba6f5063c nomad.confd e9c0161c2a9c0e1933c266520a410764a709c7b4f65b1a81c1fb2494eae89daa847ffca5df46d6eea61d855f35d21e66433ec0afe8c08017187c917e952b8544 nvidia-driver.patch c2ba7db5bb0858547bf346819945d24626ac761541f38350b40408e1b26227549f6aa4d6946baadbf856329c0ac9f81f84164597d11361224b62a1697f17e726 server.hcl 3810c6e0d3e5c202567ac95d04e363b4f28bf39e37a746c5c50b38c18bec3b6256d25f9e0a7fcbe7b7b12dbb007cdefe029a8b74fe8190d019c717d77a9a77fd static-assets.patch 668c218c9c854e22e2b50d194208894570fb2ef09e87080d3b9f8749cd8e6d0c0a9ce0a049fc0f29a4a86a58ddc8cdf8aff08fb70c5cbe83136241d047da4b75 ui-remove-husky.patch 73649e8100916b2c7a829ff3bd1ca4514043cbe4cdfd81d14c6aff9cae099b9f59b3003664a4aad6821f8af89fa51990fe3252111e638b368ff1e357e017d538 ui-upgrade-node-sass.patch"