diff options
author | Josephine Pfeiffer | 2023-02-28 12:15:48 +0100 |
---|---|---|
committer | Josephine Pfeiffer | 2023-02-28 12:17:30 +0100 |
commit | 7306faa8e0ae7a174e72319a3ba7795d4119860c (patch) | |
tree | bf75589c6222c3008b2e3769b92fdc6629ad8fa5 | |
parent | 6a58dfe8310aa6bea4eaec8ab4014770ff51a9b7 (diff) | |
download | aur-7306faa8e0ae7a174e72319a3ba7795d4119860c.tar.gz |
updated PKGBUILD
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 43 |
3 files changed, 51 insertions, 14 deletions
@@ -1,12 +1,15 @@ pkgbase = tekton-cli-bin pkgdesc = A CLI for interacting with Tekton. - pkgver = 0.19.1 + pkgver = 0.29.1 pkgrel = 1 url = https://github.com/tektoncd/cli arch = x86_64 - license = Apache - provides = tekton-cli - source = https://github.com/tektoncd/cli/releases/download/v0.19.1/tkn_0.19.1_Linux_x86_64.tar.gz - sha256sums = 3e246a60e4ace03c394e18590ec0ec1a0cb14393008833acd75a6889fe91ffc2 + license = Apache-2.0 + makedepends = git + makedepends = go + conflicts = tektoncd-cli + conflicts = tekton-cli + source = git+https://github.com/tektoncd/cli#commit=d48a2cc72e7f695b4a90cee62678fd9764a7db85 + sha256sums = SKIP pkgname = tekton-cli-bin diff --git a/.gitignore b/.gitignore index 05b7024f0dd9..44519375d8c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ -tkn_*_Linux_x86_64.tar.gz -tekton-cli-bin-*-x86_64-package.log +# Ignore everything +* + +# Except these +!.gitignore +!PKGBUILD +!.SRCINFO @@ -1,16 +1,45 @@ -# Maintainer: tercean <cg@zknt.org> +# Maintainer: Josephine Pfeiffer <jpfeiffe@redhat.com> pkgname=tekton-cli-bin -pkgver=0.19.1 +pkgver=0.29.1 pkgrel=1 pkgdesc='A CLI for interacting with Tekton.' arch=('x86_64') url='https://github.com/tektoncd/cli' -license=('Apache') -provides=('tekton-cli') -source=("https://github.com/tektoncd/cli/releases/download/v${pkgver}/tkn_${pkgver}_Linux_x86_64.tar.gz") -sha256sums=('3e246a60e4ace03c394e18590ec0ec1a0cb14393008833acd75a6889fe91ffc2') +license=('Apache-2.0') +makedepends=(git go) +conflicts=(tektoncd-cli tekton-cli) +_commit="d48a2cc72e7f695b4a90cee62678fd9764a7db85" # v0.29.1 +source=("git+$url#commit=$_commit") +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/cli" + git describe --tags | sed 's/^v//;s/-/+/g' +} + +prepare(){ + cd "$srcdir/cli" + mkdir -p build/ +} + +build() { + cd "$srcdir/cli" + 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 -o build ./cmd/tkn +} + +check() { + cd "$srcdir/cli" + go test -v $(go list ./... | grep -v third_party/) +} package() { - install -Dm 755 "$srcdir/tkn" "${pkgdir}/usr/bin/tkn" + cd "$srcdir/cli" + install -Dm755 build/tkn "$pkgdir"/usr/bin/tkn + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/tkn/LICENSE" } |