aboutsummaryrefslogtreecommitdiffstats
path: root/community/cni-plugin-flannel/APKBUILD
blob: ce1cbb031da290d929f9e2a49997510be7a63f70 (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
# Contributor: Robert Günzler <r@gnzler.io>
pkgname=cni-plugin-flannel
pkgver=1.0.0
pkgrel=4
pkgdesc="networking plugin, designed to work with flannel network fabric"
options="!check"
url="https://github.com/flannel-io/cni-plugin/"
arch="all"
license="Apache-2.0"
makedepends="go bash linux-headers"
source="$pkgname-$pkgver.tar.gz::https://github.com/flannel-io/cni-plugin/archive/v$pkgver.tar.gz"
builddir="$srcdir/cni-plugin-$pkgver"

build() {
	export VERSION="$pkgver"
	export GOARCH="$(go env GOARCH)"

	go mod tidy
	go mod vendor
	bash ./scripts/build_flannel.sh
}

package() {
	install -Dm755 -t "$pkgdir"/usr/libexec/cni dist/"flannel-$(go env GOARCH)"
}

sha512sums="4b75cfe2af334b974093e520657a92f69e2d20b43319d8425d7f024aef0ed5b923908a55fe146a561a5e3e83be9fda218e4317b29d9e58c2f414402c58f0fea6  cni-plugin-flannel-1.0.0.tar.gz"