[arch-commits] Commit in (ko ko/repos ko/trunk ko/trunk/PKGBUILD)
Christian Rebischke
shibumi at gemini.archlinux.org
Thu Sep 16 21:12:21 UTC 2021
Date: Thursday, September 16, 2021 @ 21:12:21
Author: shibumi
Revision: 1016576
add ko
Added:
ko/
ko/repos/
ko/trunk/
ko/trunk/PKGBUILD
----------+
PKGBUILD | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
Added: ko/trunk/PKGBUILD
===================================================================
--- ko/trunk/PKGBUILD (rev 0)
+++ ko/trunk/PKGBUILD 2021-09-16 21:12:21 UTC (rev 1016576)
@@ -0,0 +1,40 @@
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+
+pkgname=ko
+pkgver=0.8.3
+pkgrel=1
+pkgdesc="Build and deploy Go applications on Kubernetes"
+arch=('x86_64')
+url="https://github.com/google/ko"
+license=('Apache')
+makedepends=('go' 'git')
+depends=('glibc')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/google/ko/archive/refs/tags/v${pkgver}.tar.gz")
+sha512sums=('31bb2657d1dd78686be24748cf884f9c1ff0259df9e2e0683a95fce3426aa24c075380d1fc0505ff6e7f67ad949cc4f82df3b6649a1b411ca0dea6023b26d5f9')
+b2sums=('ca4fd205bd790412fe3b4647ad7aeea445d23e0131986c1e3a272f4265b9743dc07133d9b741113c4cdf0794e6bc5c4f4afc3be9fde1320229386ac1bce32f50')
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -ldflags="-w -s -linkmode=external" .
+ chmod +x ./ko
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ # currently disabled
+ #go test -v -x ./...
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ install -Dsm755 ./ko "${pkgdir}/usr/bin/ko"
+ mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
+ mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
+ ./ko completion > "${pkgdir}/usr/share/bash-completion/completions/ko"
+ ./ko completion --zsh > "${pkgdir}/usr/share/zsh/site-functions/_ko"
+}
More information about the arch-commits
mailing list