[arch-commits] Commit in kubectl-ingress-nginx/repos (2 files)

Christian Rebischke shibumi at archlinux.org
Sun Feb 21 19:18:16 UTC 2021


    Date: Sunday, February 21, 2021 @ 19:18:16
  Author: shibumi
Revision: 867859

archrelease: copy trunk to community-x86_64

Added:
  kubectl-ingress-nginx/repos/community-x86_64/
  kubectl-ingress-nginx/repos/community-x86_64/PKGBUILD
    (from rev 867858, kubectl-ingress-nginx/trunk/PKGBUILD)

----------+
 PKGBUILD |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

Copied: kubectl-ingress-nginx/repos/community-x86_64/PKGBUILD (from rev 867858, kubectl-ingress-nginx/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2021-02-21 19:18:16 UTC (rev 867859)
@@ -0,0 +1,47 @@
+# Maintainer: christian rebischke <chris.rebischke at archlinux.org>
+# Contributor: ml <ml at visu.li>
+pkgname=kubectl-ingress-nginx
+_pkgname=${pkgname#kubectl-}-controller
+_bin=kubectl-ingress_nginx
+pkgver=0.33.0
+pkgrel=2
+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
+}
+
+package() {
+  cd "${_pkgname}-${pkgver}"
+  install -Dm755 ${_bin} -t "${pkgdir}/usr/bin"
+  install -Dm644 docs/kubectl-plugin.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list