2019-08-30 05:04:48 +00:00
|
|
|
# Template file for 'k3s'
|
|
|
|
pkgname=k3s
|
2019-10-29 03:50:15 +00:00
|
|
|
version=1.0.0
|
|
|
|
revision=1
|
2019-09-24 02:38:08 +00:00
|
|
|
create_wrksrc=yes
|
|
|
|
build_wrksrc="${pkgname}-${version}"
|
2019-08-30 05:04:48 +00:00
|
|
|
build_style=go
|
|
|
|
go_import_path="github.com/rancher/k3s"
|
2019-09-24 02:38:08 +00:00
|
|
|
hostmakedepends="git pkg-config"
|
|
|
|
makedepends="libseccomp-devel"
|
2019-10-29 03:50:15 +00:00
|
|
|
depends="ipset conntrack-tools"
|
2019-09-24 02:38:08 +00:00
|
|
|
short_desc="Lightweight Kubernetes"
|
2019-08-30 05:04:48 +00:00
|
|
|
maintainer="Cameron Nemo <cnemo@tutanota.com>"
|
|
|
|
license="Apache-2.0"
|
2019-09-24 02:38:08 +00:00
|
|
|
homepage="https://k3s.io"
|
|
|
|
# _traefik_* variables' values from scripts/download in source distfile
|
|
|
|
_traefik_version="1.77.1"
|
|
|
|
_traefik_file="traefik-${_traefik_version}.tgz"
|
2019-10-29 03:50:15 +00:00
|
|
|
_plugins_version="0.7.6-k3s1"
|
|
|
|
_plugins_file="v${_plugins_version}.tar.gz"
|
2019-09-24 02:38:08 +00:00
|
|
|
distfiles="https://${go_import_path}/archive/v${version}.tar.gz
|
2019-10-29 03:50:15 +00:00
|
|
|
https://github.com/rancher/plugins/archive/${_plugins_file}
|
2019-09-24 02:38:08 +00:00
|
|
|
https://kubernetes-charts.storage.googleapis.com/${_traefik_file}"
|
2019-10-29 03:50:15 +00:00
|
|
|
checksum="7b9222dcaa4bbc387dd6f38a653b7b2b09079987c19a399c6c4f3e5b3dc1d39c
|
|
|
|
75e02aa09edcfb2b43d41cd576e24099e9bca21d80bda0dcdc3f98f2357f1363
|
2019-09-24 02:38:08 +00:00
|
|
|
15dd78d136d7c9bae7144072052ef6cd12821ae081a7c085f145d834d96c5d5c"
|
|
|
|
skip_extraction="${_traefik_file}"
|
|
|
|
|
2019-10-29 03:50:15 +00:00
|
|
|
_git_commit=18bd921cddee1e95cc03467a1b9636ddacd9d670
|
2019-09-24 02:38:08 +00:00
|
|
|
|
|
|
|
pre_build() {
|
|
|
|
# Modify version.sh to use template variables' values.
|
|
|
|
vsed -i scripts/version.sh -e '
|
2019-10-29 03:50:15 +00:00
|
|
|
s@^COMMIT=.*@COMMIT='"${_git_commit::10}"'@;
|
2019-09-24 02:38:08 +00:00
|
|
|
s@^GIT_TAG=.*@GIT_TAG=v'"${version}"'@
|
|
|
|
'
|
|
|
|
|
|
|
|
# Recreate behavior of scripts/download minus downloading
|
|
|
|
# anything or having anything to do with busybox.
|
2019-10-29 03:50:15 +00:00
|
|
|
mkdir -p etc bin build/static/charts
|
2019-09-24 02:38:08 +00:00
|
|
|
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_traefik_file} build/static/charts/${_traefik_file}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
scripts/build
|
|
|
|
scripts/package-cli
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
vbin dist/artifacts/k3s
|
|
|
|
vsv k3s-server
|
|
|
|
vsv k3s-agent
|
|
|
|
}
|