aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Angelo Compagnucci <angelo@amarulasolutions.com>2018-03-31 15:27:32 +0200
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2018-03-31 19:57:31 +0200
commit96dafedce8d074e068672b8384193ea3b68bf393 (patch)
tree9f9438ba8ea2e77fd0f371c55cdef5f0c301fb6a
parent12ae882bf66ed19bed0e9e127f4d6833aed453e2 (diff)
downloadbuildroot-96dafedce8d074e068672b8384193ea3b68bf393.tar.gz
buildroot-96dafedce8d074e068672b8384193ea3b68bf393.tar.bz2
package/flannel: convert to golang infrastructure
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
-rw-r--r--package/flannel/flannel.mk32
1 files changed, 4 insertions, 28 deletions
diff --git a/package/flannel/flannel.mk b/package/flannel/flannel.mk
index bbb2c72a72..07d5d0dfd6 100644
--- a/package/flannel/flannel.mk
+++ b/package/flannel/flannel.mk
@@ -11,36 +11,12 @@ FLANNEL_SOURCE = $(FLANNEL_VERSION).tar.gz
FLANNEL_LICENSE = Apache-2.0
FLANNEL_LICENSE_FILES = LICENSE
-FLANNEL_DEPENDENCIES = host-go
-
-FLANNEL_MAKE_ENV = \
- $(HOST_GO_TARGET_ENV) \
- GOBIN="$(@D)/bin" \
- GOPATH="$(@D)/gopath" \
- CGO_ENABLED=1
-
-FLANNEL_GLDFLAGS = \
- -X github.com/coreos/flannel/version.Version=$(FLANNEL_VERSION)
-
-ifeq ($(BR2_STATIC_LIBS),y)
-FLANNEL_GLDFLAGS += -extldflags '-static'
-endif
-
-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)/bin/go \
- build -v -o $(@D)/bin/flanneld -ldflags "$(FLANNEL_GLDFLAGS)" .
-endef
+FLANNEL_LDFLAGS = -X github.com/coreos/flannel/version.Version=$(FLANNEL_VERSION)
+# Install flannel to its well known location.
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)/$(FLANNEL_BINDIR)/flannel $(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))
+$(eval $(golang-package))