summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Lisin2020-07-08 17:33:44 +0200
committerMatthias Lisin2020-07-08 17:33:44 +0200
commit7203dd9c56b8b76c1b0738dd3e39edf0ef49ffad (patch)
tree5d16b453d4537f701de3ffc6767ae924e1b2fde7
downloadaur-7203dd9c56b8b76c1b0738dd3e39edf0ef49ffad.tar.gz
newpkg: kubectl-ingress-nginx 0.33.0-1
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD48
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5e2bd27af59d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = kubectl-ingress-nginx
+ pkgdesc = kubectl plugin for managing NGINX Ingress Controller for Kubernetes
+ pkgver = 0.33.0
+ pkgrel = 1
+ url = https://github.com/kubernetes/ingress-nginx
+ arch = x86_64
+ groups = kubectl-plugins
+ license = Apache
+ makedepends = go
+ makedepends = git
+ depends = glibc
+ source = https://github.com/kubernetes/ingress-nginx/archive/controller-0.33.0/kubectl-ingress-nginx-0.33.0.tar.gz
+ sha256sums = a7977350b60bee377c441082067bd58b1dbc1cede504f66069b35efa5d6ea817
+
+pkgname = kubectl-ingress-nginx
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f1ecb611e6e2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/pkg/
+/src/
+/*.log
+/*.tar.gz
+/*.pkg.tar*
+/*.src.tar*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..55ab0c73e68d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: ml <ml@visu.li>
+pkgname=kubectl-ingress-nginx
+_pkgname=${pkgname#kubectl-}-controller
+_bin=kubectl-ingress_nginx
+pkgver=0.33.0
+pkgrel=1
+pkgdesc='kubectl plugin for managing NGINX Ingress Controller for Kubernetes'
+arch=('x86_64')
+url='https://github.com/kubernetes/ingress-nginx'
+license=('Apache')
+depends=('glibc')
+makedepends=('go' 'git')
+groups=('kubectl-plugins')
+source=("${url}/archive/controller-${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha256sums=('a7977350b60bee377c441082067bd58b1dbc1cede504f66069b35efa5d6ea817')
+
+prepare() {
+ cd "${_pkgname}-${pkgver}"
+ go mod download
+}
+
+build() {
+ local commit=
+ commit=$(bsdcat "${pkgname}-${pkgver}.tar.gz" | git get-tar-commit-id)
+
+ local -a x=(
+ COMMIT="${commit:?}"
+ RELEASE="controller-${pkgver}"
+ REPO="$url"
+ )
+ cd "${_pkgname}-${pkgver}"
+ # enforce CGO_ENABLED=1 so the build does not break for AUR users having CGO_ENABLED=0
+ export CGO_ENABLED=1
+ export CGO_LDFLAGS="$LDFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export GOFLAGS='-buildmode=pie -trimpath -modcacherw -mod=readonly'
+ go build -o "${_bin}" -ldflags "${x[*]/#/-X=k8s.io/ingress-nginx/version.}" ./cmd/plugin
+}
+
+# check(): no simple tests available for plugin only
+
+package() {
+ cd "${_pkgname}-${pkgver}"
+ install -Dm755 ${_bin} -t "${pkgdir}/usr/bin"
+ install -Dm644 docs/kubectl-plugin.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}