diff options
author | Phillip Schichtel | 2023-07-10 12:02:38 +0200 |
---|---|---|
committer | Phillip Schichtel | 2023-07-10 12:05:23 +0200 |
commit | 781b09bcdf682186347877e41b4dd6ef8b39fe22 (patch) | |
tree | 2544ee08894385b3af6b3685cf4dde8c0296b56c | |
download | aur-781b09bcdf682186347877e41b4dd6ef8b39fe22.tar.gz |
initial commit based on nomad-pack-nightly
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | PKGBUILD | 38 | ||||
-rw-r--r-- | bash-completion.sh | 2 |
5 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..56109874e919 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = nomad-pack-git + pkgdesc = A templating and packaging tool used with HashiCorp Nomad. + pkgver = v0.0.1.techpreview2.r101.ge633fd0 + pkgrel = 1 + url = https://github.com/hashicorp/nomad-pack + arch = x86_64 + arch = armv7h + arch = aarch64 + license = MPL2 + makedepends = git + makedepends = go + depends = openssl + depends = git + optdepends = bash-completion + provides = nomad-pack + conflicts = nomad-pack + source = git+https://github.com/hashicorp/nomad-pack.git#branch=main + source = bash-completion.sh + sha256sums = SKIP + sha256sums = ac6a0c1f54833f4706ec7366c570b3088a06ca21128642f21435a7f464b98129 + +pkgname = nomad-pack-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0c0e3162fd2a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +nomad-pack/ +LICENSE +*.asc +*.tar.* +src/ +pkg/ diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..cbd793708534 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + +.SRCINFO: PKGBUILD + makepkg --printsrcinfo > .SRCINFO + +package: PKGBUILD .SRCINFO + updpkgsums + makepkg --syncdeps --rmdeps --force --clean --noconfirm + +all: package + +clean: + rm -fRv .SRCINFO *.tar.* nomad-pack/ src/ pkg/ *.asc 2> /dev/null || true diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9860757f515f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Phillip Schichtel <phillip@schich.tel> + +pkgname=nomad-pack-git +pkgver=v0.0.1.techpreview2.r101.ge633fd0 +pkgrel=1 +pkgdesc="A templating and packaging tool used with HashiCorp Nomad." +arch=('x86_64' 'armv7h' 'aarch64') +url="https://github.com/hashicorp/nomad-pack" +license=('MPL2') +depends=(openssl git) +makedepends=(git go) +optdepends=(bash-completion) +provides=(nomad-pack) +conflicts=(nomad-pack) +source=("git+https://github.com/hashicorp/nomad-pack.git#branch=main" + "bash-completion.sh") +sha256sums=('SKIP' + 'ac6a0c1f54833f4706ec7366c570b3088a06ca21128642f21435a7f464b98129') + +pkgver() { + cd "$srcdir/nomad-pack" + git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + local version="$(pkgver)" + cd "$srcdir/nomad-pack" + export CGO_ENABLED=0 + go build -ldflags "-X '$(go list -m)/internal/pkg/version.GitDescribe=${version}'" -trimpath +} + +package() { + install -D -m755 "$srcdir/nomad-pack/nomad-pack" "$pkgdir/usr/bin/nomad-pack" + local bash_completions_dir="$pkgdir/usr/share/bash-completion/completions" + install -D -d -m755 "$bash_completions_dir" + install -m644 "$srcdir/bash-completion.sh" "$bash_completions_dir/nomad-pack" +} + diff --git a/bash-completion.sh b/bash-completion.sh new file mode 100644 index 000000000000..e84ea86c6726 --- /dev/null +++ b/bash-completion.sh @@ -0,0 +1,2 @@ +complete -C /usr/bin/nomad-pack nomad-pack + |