blob: cfa896765b11a32b7d38fa70568587e054967ccd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Maintainer: Michael William Le Nguyen <michael at mail dot ttp dot codes>
pkgname=rke-git
pkgver=v1.1.0.rc4.r18.g25e7f987
pkgrel=1
pkgdesc="An extremely simple, lightning fast Kubernetes installer that works everywhere."
conflicts=(
"rke"
)
provides=(
"rke"
)
arch=('x86_64')
url="https://github.com/rancher/rke"
license=('apache')
pkgver() {
cd "${pkgname}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
makedepends=(
"git"
# Cannot be built with go-pie due to rke's build flags.
"go>=1.11"
)
source=(
"${pkgname}::git+https://github.com/rancher/rke"
"build.patch"
"ci.patch"
"version.patch"
)
sha512sums=(
"SKIP"
"cf18becc521bedafb13658d15e2a7ab8f847e375f4b4f6326320f587a11c657af6b4acd2d13e5fe885138a6c337336ed3d18001b6deb54425f96cfe6862d0331"
"097d6211104ac7772d6f96c792902f690513b6e780a686c3fdda32ef66c6dd530c7c97a575fd380c4c627e8f7c1192cd877c1512d07a118ff1ad005a2f0cc14b"
"e586996e0acc0736116cd6bd085c5bfa01bb67bf73a99fc9dcddb0c56597485a78612456dd1bcf2d8d97e54cef3b61429df4874877c88fa24b1944a04093f6f4"
)
prepare () {
cd "${pkgname}"
patch --forward --strip=1 --input="${srcdir}/build.patch"
patch --forward --strip=1 --input="${srcdir}/ci.patch"
patch --forward --strip=1 --input="${srcdir}/version.patch"
}
build () {
export GOPATH="${srcdir}/go"
cd "${pkgname}"
./scripts/entry build
}
check () {
export GOPATH="${srcdir}/go"
export PATH="$PATH:${srcdir}/go/bin"
go get -u golang.org/x/lint/golint
cd "${pkgname}"
./scripts/entry test
./scripts/entry validate
# Integration tests not run due to requiring a ton of kernel modules just to test locally.
}
package() {
export GOPATH="${srcdir}/go"
# *sigh*: https://github.com/golang/go/issues/27455
go clean -modcache
install -D -m755 "${srcdir}/${pkgname}/bin/rke" "${pkgdir}/usr/bin/${pkgname}"
}
|