summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVianney Bouchaud2023-11-04 22:40:04 +0100
committerVianney Bouchaud2023-11-04 22:40:04 +0100
commitf63834a3bb58d5e72cff39baa16c281758d98904 (patch)
tree954a92fe09c5173e1f492e46401c9a74e14a857a
parentec9b335cb9380b92626714bdce78f907c829151a (diff)
downloadaur-f63834a3bb58d5e72cff39baa16c281758d98904.tar.gz
upgpkg: kubeshark 51.0.18-1
upstream release alas, fixing kubeshark subtree
-rw-r--r--.SRCINFO6
-rw-r--r--.autoupdate0
-rw-r--r--PKGBUILD18
-rw-r--r--PKGBUILD.tpl56
4 files changed, 70 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 51f0c02b7bad..dc8dc2d095a0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = kubeshark
pkgdesc = Kubeshark is an API Traffic Analyzer for Kubernetes.
- pkgver = 50.4
+ pkgver = 51.0.18
pkgrel = 1
url = https://github.com/kubeshark/kubeshark
arch = x86_64
arch = aarch64
license = apache
makedepends = go
- source = kubeshark-50.4.tar.gz::https://github.com/kubeshark/kubeshark/archive/50.4.tar.gz
- sha256sums = 334a28382a800f0d2f6c934f04b6f0e826cbe3f96a52e052f2cef877a5319e15
+ source = kubeshark-51.0.18.tar.gz::https://github.com/kubeshark/kubeshark/archive/v51.0.18.tar.gz
+ sha256sums = 6b19df1956d41bd4a52bd219d8a380156c23a052d0569674e796e99b4ba38179
pkgname = kubeshark
diff --git a/.autoupdate b/.autoupdate
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/.autoupdate
diff --git a/PKGBUILD b/PKGBUILD
index 299312e0dc20..9227bcae862c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=kubeshark
pkgdesc="Kubeshark is an API Traffic Analyzer for Kubernetes."
-pkgver=50.4
+pkgver=51.0.18
pkgrel=1
arch=('x86_64' 'aarch64')
url="https://github.com/kubeshark/kubeshark"
@@ -11,12 +11,12 @@ makedepends=(
'go'
)
-source=(
- "${pkgname}-${pkgver}.tar.gz::https://github.com/kubeshark/kubeshark/archive/${pkgver}.tar.gz"
-)
+_latest() {
+ curl -s https://api.github.com/repos/kubeshark/kubeshark/releases | jq -r '.[0].tag_name'
+}
-sha256sums=(
- "334a28382a800f0d2f6c934f04b6f0e826cbe3f96a52e052f2cef877a5319e15"
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/kubeshark/kubeshark/archive/v${pkgver}.tar.gz"
)
build() {
@@ -43,7 +43,7 @@ build() {
-X 'github.com/kubeshark/kubeshark/misc.GitCommitHash=' \
-X 'github.com/kubeshark/kubeshark/misc.Branch=' \
-X 'github.com/kubeshark/kubeshark/misc.Platform=${platform}' \
- -X 'github.com/kubeshark/kubeshark/misc.Ver=${pkgver}' \
+ -X 'github.com/kubeshark/kubeshark/misc.Ver=v${pkgver}' \
-s -w" \
-o bin/kubeshark kubeshark.go
}
@@ -54,3 +54,7 @@ package() {
"${pkgdir}/usr/bin/kubeshark" completion bash | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/kubeshark"
"${pkgdir}/usr/bin/kubeshark" completion zsh | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_kubeshark"
}
+
+sha256sums=(
+ 6b19df1956d41bd4a52bd219d8a380156c23a052d0569674e796e99b4ba38179
+)
diff --git a/PKGBUILD.tpl b/PKGBUILD.tpl
new file mode 100644
index 000000000000..e329dc7f4dae
--- /dev/null
+++ b/PKGBUILD.tpl
@@ -0,0 +1,56 @@
+# Maintainer: Vianney Bouchaud <aur dot vianney at bouchaud dot org>
+
+pkgname=kubeshark
+pkgdesc="Kubeshark is an API Traffic Analyzer for Kubernetes."
+pkgver=$KUBESHARK_VERSION
+pkgrel=1
+arch=('x86_64' 'aarch64')
+url="https://github.com/kubeshark/kubeshark"
+license=('apache')
+makedepends=(
+ 'go'
+)
+
+_latest() {
+ curl -s https://api.github.com/repos/kubeshark/kubeshark/releases | jq -r '.[0].tag_name'
+}
+
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/kubeshark/kubeshark/archive/v${pkgver}.tar.gz"
+)
+
+build() {
+ export GOPATH="$srcdir"/gopath
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_ENABLED=1
+
+ cd "$srcdir/$pkgname-$pkgver"
+
+ platform=$(go env GOOS)-$(go env GOARCH)
+
+ go build ${GCLFAGS} \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags="\
+ -linkmode=external \
+ -buildid=''
+ -extldflags=\"${LDFLAGS}\" \
+ -X 'github.com/kubeshark/kubeshark/misc.GitCommitHash=' \
+ -X 'github.com/kubeshark/kubeshark/misc.Branch=' \
+ -X 'github.com/kubeshark/kubeshark/misc.Platform=${platform}' \
+ -X 'github.com/kubeshark/kubeshark/misc.Ver=v${pkgver}' \
+ -s -w" \
+ -o bin/kubeshark kubeshark.go
+}
+
+package() {
+ install -D -m0755 "${srcdir}/$pkgname-$pkgver/bin/kubeshark" "${pkgdir}/usr/bin/kubeshark"
+
+ "${pkgdir}/usr/bin/kubeshark" completion bash | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/kubeshark"
+ "${pkgdir}/usr/bin/kubeshark" completion zsh | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_kubeshark"
+}