Date: Monday, November 8, 2021 @ 01:27:42 Author: shibumi Revision: 1038766
upgpkg: kubectl-ingress-nginx 1.0.4-1 Modified: kubectl-ingress-nginx/trunk/PKGBUILD ----------+ PKGBUILD | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-11-08 00:41:31 UTC (rev 1038765) +++ PKGBUILD 2021-11-08 01:27:42 UTC (rev 1038766) @@ -3,8 +3,8 @@ pkgname=kubectl-ingress-nginx _pkgname=${pkgname#kubectl-}-controller _bin=kubectl-ingress_nginx -pkgver=0.33.0 -pkgrel=2 +pkgver=1.0.4 +pkgrel=1 pkgdesc='kubectl plugin for managing NGINX Ingress Controller for Kubernetes' arch=('x86_64') url='https://github.com/kubernetes/ingress-nginx' @@ -12,36 +12,23 @@ depends=('glibc') makedepends=('go' 'git') groups=('kubectl-plugins') -source=("${url}/archive/controller-${pkgver}/${pkgname}-${pkgver}.tar.gz") -sha256sums=('a7977350b60bee377c441082067bd58b1dbc1cede504f66069b35efa5d6ea817') +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kubernetes/ingress-nginx/archive/refs/tags/controller-v${pkgver}.tar.gz") +sha512sums=('65017d83df1640c5f97cbe7bc121a3581f98b60fb6f51415cc17bc8513df9d597057f7a3ed37c0623a3cb38536e55607fe75645d8a561583cfcbd2e7c06b1961') +b2sums=('97f25eca3366bf3ea59957083a6538417fef5908c9f7a6b4f4c7d3161a304591f09970509f2bf49023c87ff225a2c7aa4f5d4930641ec78b954d5914616e250e') -prepare() { - cd "${_pkgname}-${pkgver}" - go mod download -} - build() { - local commit= - commit=$(bsdcat "${pkgname}-${pkgver}.tar.gz" | git get-tar-commit-id) + cd "${_pkgname}-v${pkgver}" - 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 + go build -o "${_bin}" -ldflags "-w -s -linkmode=external" ./cmd/plugin } package() { - cd "${_pkgname}-${pkgver}" + cd "${_pkgname}-v${pkgver}" install -Dm755 ${_bin} -t "${pkgdir}/usr/bin" install -Dm644 docs/kubectl-plugin.md -t "${pkgdir}/usr/share/doc/${pkgname}" }