# Contributor: Oleg Titov # Maintainer: Oleg Titov pkgname=k3s pkgver=0.6.1 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" subpackages="$pkgname-doc $pkgname-openrc" source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/k3s/archive/v$pkgver.tar.gz k3s.initd k3s.confd " 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() { 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/doc/$pkgname README.md install -m755 -D "$srcdir"/k3s.initd "$pkgdir"/etc/init.d/k3s install -m644 -D "$srcdir"/k3s.confd "$pkgdir"/etc/conf.d/k3s } sha512sums="41cae0809f3bb82906c98c31c8069b012ae965e21a2bf8bb9bc544bccc1793fa9aa14161ebea73e26f4b67f16ec703031921037c6c65a7f46d34328f41c1a80e k3s-0.6.1.tar.gz 9501422f1bf5375555116cbeedb32de32109153396699bde1300ce01156c3e57fe3fb14a57f7de1dce47c955e5e6d61de7fea181a07b407f5b452006bc58991c k3s.initd dda2fc70e884ef439fece8f850d798f98d07cd431f0b8b79183f192b35f68fc7c633d3c790aae7b86ca57331212a7bb2f783131b752a4e1e71ef918469e6b944 k3s.confd"