[arch-commits] Commit in (4 files)

Christian Rebischke shibumi at archlinux.org
Thu Nov 12 19:51:00 UTC 2020


    Date: Thursday, November 12, 2020 @ 19:51:00
  Author: shibumi
Revision: 753649

add operator-sdk

Added:
  operator-sdk/
  operator-sdk/repos/
  operator-sdk/trunk/
  operator-sdk/trunk/PKGBUILD

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

Added: operator-sdk/trunk/PKGBUILD
===================================================================
--- operator-sdk/trunk/PKGBUILD	                        (rev 0)
+++ operator-sdk/trunk/PKGBUILD	2020-11-12 19:51:00 UTC (rev 753649)
@@ -0,0 +1,44 @@
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+
+pkgname=operator-sdk
+pkgver=1.2.0
+pkgrel=1
+pkgdesc="SDK for building Kubernetes applications"
+arch=('x86_64')
+url="https://github.com/operator-framework/operator-sdk"
+license=('Apache')
+makedepends=('go')
+depends=('glibc')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/operator-framework/operator-sdk/archive/v${pkgver}.tar.gz")
+sha512sums=('eed8e0eb70a78b78fd14802857d46cdb7ccc35e645f613c0af8702c76b4659adc47878ce45dfba0d051fcf3a3eacbb54769ea4dc06d0d83c7cf3f9a0b9d3fc73')
+
+prepare() {
+  export GOPATH="${srcdir}"
+  mkdir -p src/github.com/operator-framework "${GOPATH}/bin"
+  mv "${pkgname}-${pkgver}" "src/github.com/operator-framework/${pkgname}"
+  export PACKAGE_ROOT="${GOPATH}/src/github.com/operator-framework/${pkgname}"
+}
+
+build() {
+  cd "${PACKAGE_ROOT}"
+  export CGO_ENABLED=1
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+  export GOLDFLAGS="-linkmode=external"
+  go build -v ./cmd/{operator-sdk,ansible-operator,helm-operator}
+}
+
+check() {
+  cd "${PACKAGE_ROOT}"
+  go test -v ./...
+}
+
+package() {
+  cd "${PACKAGE_ROOT}/cmd/"
+  install -Dsm755 ./operator-sdk "${pkgdir}/usr/bin/operator-sdk"
+  install -Dsm755 ./ansible-operator "${pkgdir}/usr/bin/ansible-operator"
+  install -Dsm755 ./helm-operator "${pkgdir}/usr/bin/helm-operator"
+}



More information about the arch-commits mailing list