diff options
author | Jeff Henson | 2022-11-08 11:07:16 -0700 |
---|---|---|
committer | Jeff Henson | 2022-11-08 11:07:16 -0700 |
commit | 42f5f87d9ffcd87073406d54c4f5387964856b2d (patch) | |
tree | 460328f87bb35ad1638d1a228327fb0ad90944f6 /PKGBUILD | |
download | aur-42f5f87d9ffcd87073406d54c4f5387964856b2d.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3e1726c9dfbe --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Jeff Henson <jeff@henson.io> + +pkgname=octopusdeploy-cli +pkgver=0.5.0 +pkgrel=1 +pkgdesc="Next Generation of the Octopus Deploy CLI" +arch=('x86_64' 'i686') +url="https://github.com/OctopusDeploy/cli" +license=('Apache') +depends=('glibc') +makedepends=('go') +source=("cli-$pkgver.tar.gz::${url}/archive/v${pkgver}.tar.gz") +sha256sums=('618b4bdbe8842771d05c75b9660fae77b741db4430ba4683defa69da8ba2a2c7') + +build() { + cd "cli-${pkgver}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build ./cmd/octopus +} + +package() { + cd "cli-${pkgver}" + install -vDm 755 octopus -t "${pkgdir}/usr/bin/" + install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}/" + install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/" + + # build bash completions + mkdir -p "${pkgdir}/usr/share/bash-completion/completions" + OCTOPUS_HOST=https://localhost OCTOPUS_API_KEY=API=key ./octopus completion bash > "${pkgdir}/usr/share/bash-completion/completions/octopus" + + # build zsh completions + mkdir -p "${pkgdir}/usr/share/zsh/site-functions" + OCTOPUS_HOST=https://localhost OCTOPUS_API_KEY=API=key ./octopus completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_octopus" + + # build fish completions + mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/" + OCTOPUS_HOST=https://localhost OCTOPUS_API_KEY=API=key ./octopus completion fish > "${pkgdir}/usr/share/fish/vendor_completions.d/octopus.fish" +} |