Skip to content

Commit

Permalink
Add package for cni-plugins 0.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
afbjorklund committed Jul 8, 2020
1 parent e48d182 commit 2c90a12
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions buildroot_defconfig
Expand Up @@ -72,3 +72,4 @@ BR2_PACKAGE_BASH=y
# Kubernetes
BR2_PACKAGE_KUBERNETES=y
BR2_PACKAGE_CRI_TOOLS=y
BR2_PACKAGE_CNI_PLUGINS=y
1 change: 1 addition & 0 deletions external/package/Config.in
@@ -1,4 +1,5 @@
menu "Kubernetes"
source "$BR2_EXTERNAL_KUBERNETES_PATH/package/kubernetes/Config.in"
source "$BR2_EXTERNAL_KUBERNETES_PATH/package/cri-tools/Config.in"
source "$BR2_EXTERNAL_KUBERNETES_PATH/package/cni-plugins/Config.in"
endmenu
5 changes: 5 additions & 0 deletions external/package/cni-plugins/Config.in
@@ -0,0 +1,5 @@
config BR2_PACKAGE_CNI_PLUGINS
bool "cni-plugins"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
help
Some CNI network plugins, maintained by the containernetworking team.
1 change: 1 addition & 0 deletions external/package/cni-plugins/cni-plugins.hash
@@ -0,0 +1 @@
sha256 3a77de1fcd3b818a2062d9208cab3492ad5cf8177f8fb5e86419e81143c86fa5 v0.8.6.tar.gz
34 changes: 34 additions & 0 deletions external/package/cni-plugins/cni-plugins.mk
@@ -0,0 +1,34 @@
################################################################################
#
# cni-plugins
#
################################################################################

CNI_PLUGINS_VERSION = 0.8.6
CNI_PLUGINS_SITE = https://github.com/containernetworking/plugins/archive
CNI_PLUGINS_LICENSE = Apache-2.0

CNI_PLUGINS_SOURCE = v$(CNI_PLUGINS_VERSION).tar.gz

CNI_PLUGINS_MAKE_ENV = \
CGO_ENABLED=0 \
GO111MODULE=on

CNI_PLUGINS_BUILDFLAGS = -ldflags '-extldflags -static -X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=v$(CNI_PLUGINS_VERSION)'

define CNI_PLUGINS_BUILD_CMDS
(cd $(@D); $(CNI_PLUGINS_MAKE_ENV) ./build_linux.sh $(CNI_PLUGINS_BUILDFLAGS))
endef

define CNI_PLUGINS_INSTALL_TARGET_CMDS
cd $(@D); for bin in bin/*; do \
$(INSTALL) -D -m 0755 \
$(@D)/$$bin \
$(TARGET_DIR)/opt/cni/$$bin; \
ln -sf \
../../opt/cni/$$bin \
$(TARGET_DIR)/usr/$$bin; \
done
endef

$(eval $(generic-package))

0 comments on commit 2c90a12

Please sign in to comment.