void-packages/srcpkgs/k3s/template

54 lines
1.6 KiB
Bash
Raw Normal View History

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