2016-04-04 21:31:49 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# flannel
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
FLANNEL_VERSION = v0.5.5
|
|
|
|
FLANNEL_SITE = https://github.com/coreos/flannel/archive
|
|
|
|
FLANNEL_SOURCE = $(FLANNEL_VERSION).tar.gz
|
|
|
|
|
|
|
|
FLANNEL_LICENSE = Apache-2.0
|
|
|
|
FLANNEL_LICENSE_FILES = LICENSE
|
|
|
|
|
|
|
|
FLANNEL_DEPENDENCIES = host-go
|
|
|
|
|
|
|
|
FLANNEL_MAKE_ENV = \
|
2016-05-26 20:21:33 +02:00
|
|
|
$(HOST_GO_TARGET_ENV) \
|
2016-04-04 21:31:49 +02:00
|
|
|
GOBIN="$(@D)/bin" \
|
|
|
|
GOPATH="$(@D)/gopath" \
|
|
|
|
CGO_ENABLED=1
|
|
|
|
|
|
|
|
FLANNEL_GLDFLAGS = \
|
2017-04-05 00:50:14 +02:00
|
|
|
-X github.com/coreos/flannel/version.Version=$(FLANNEL_VERSION)
|
2016-07-24 16:43:46 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
FLANNEL_GLDFLAGS += -extldflags '-static'
|
|
|
|
endif
|
2016-04-04 21:31:49 +02:00
|
|
|
|
|
|
|
define FLANNEL_CONFIGURE_CMDS
|
|
|
|
# Put sources at prescribed GOPATH location.
|
|
|
|
mkdir -p $(@D)/gopath/src/github.com/coreos
|
|
|
|
ln -s $(@D) $(@D)/gopath/src/github.com/coreos/flannel
|
|
|
|
endef
|
|
|
|
|
|
|
|
define FLANNEL_BUILD_CMDS
|
|
|
|
cd $(@D) && $(FLANNEL_MAKE_ENV) $(HOST_DIR)/usr/bin/go \
|
|
|
|
build -v -o $(@D)/bin/flanneld -ldflags "$(FLANNEL_GLDFLAGS)" .
|
|
|
|
endef
|
|
|
|
|
|
|
|
define FLANNEL_INSTALL_TARGET_CMDS
|
|
|
|
# Install flannel to its well known location.
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/bin/flanneld $(TARGET_DIR)/opt/bin/flanneld
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/dist/mk-docker-opts.sh $(TARGET_DIR)/opt/bin/mk-docker-opts.sh
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|