diff options
author | Oleg Titov <oleg.titov@gmail.com> | 2019-04-26 09:41:02 -0500 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-04-27 16:53:44 +0000 |
commit | dc87603af85c0204ae07122d043cf30a05d2acd9 (patch) | |
tree | 3149458305d9ee281ab7743463fe8094c12e903f /testing/k3s | |
parent | 2294e239b2d97e11e6c53f3a44cbe81d2eff692f (diff) | |
download | aports-dc87603af85c0204ae07122d043cf30a05d2acd9.tar.bz2 aports-dc87603af85c0204ae07122d043cf30a05d2acd9.tar.xz |
testing/k3s: new aport
https://k3s.io
Lightweight Kubernetes. 5 less than k8s.
Closes GH-7350
Diffstat (limited to 'testing/k3s')
-rw-r--r-- | testing/k3s/APKBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/k3s/APKBUILD b/testing/k3s/APKBUILD new file mode 100644 index 0000000000..c117bc67b1 --- /dev/null +++ b/testing/k3s/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Oleg Titov <oleg.titov@gmail.com> +# Maintainer: Oleg Titov <oleg.titov@gmail.com> +pkgname=k3s +pkgver=0.4.0 +pkgrel=0 +pkgdesc="Lightweigt Kubernetes. 5 less than k8s." +url="https://k3s.io" +arch="all" +license="Apache-2.0" +options="!check" # No test suite from upstream +depends="containerd" +makedepends="go linux-headers" +install="" +subpackages="$pkgname-doc" +source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/k3s/archive/v$pkgver.tar.gz" +builddir="$srcdir/src/github.com/rancher/$pkgname" + +prepare() { + export GOPATH="$srcdir" + + mkdir -p $(dirname $builddir) + mv "$srcdir"/$pkgname-$pkgver "$builddir"/ + + default_prepare +} + +build() { + msg2 "Prepare GOPATH and GOBIN..." + export GOPATH="$srcdir" + export GOBIN="$GOPATH/bin" + + msg2 "Building k3s..." + go build -o k3s + + msg2 "Building kubectl..." + go build -o kubectl ./cmd/kubectl + + msg2 "Building hypercube..." + go build -o hyperkube ./vendor/k8s.io/kubernetes/cmd/hyperkube +} + +package() { + cd "$builddir" + + install -m755 -D k3s \ + "$pkgdir"/usr/bin/k3s + install -m755 -D kubectl \ + "$pkgdir"/usr/bin/kubectl + install -m755 -D hyperkube \ + "$pkgdir"/usr/bin/hypercube + + install -m644 -D -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE + install -m644 -D -t "$pkgdir"/usr/share/doc/$pkgname README.md +} + +sha512sums="9669c4b6d764c47ecbe6c295bc486c25a4030d87491503645de30828bfab3784ac3239f9a8763053783db788ab2cde45d059a37e23440c045ae06a2ae94b763c k3s-0.4.0.tar.gz" |