1 ################################################################################
5 ################################################################################
7 FLANNEL_VERSION
= v0.5
.5
8 FLANNEL_SITE
= https
://github.com
/coreos
/flannel
/archive
9 FLANNEL_SOURCE
= $(FLANNEL_VERSION
).
tar.gz
11 FLANNEL_LICENSE
= Apache-2.0
12 FLANNEL_LICENSE_FILES
= LICENSE
14 FLANNEL_DEPENDENCIES
= host-go
17 $(HOST_GO_TARGET_ENV
) \
19 GOPATH
="$(@D)/gopath" \
23 -X github.com
/coreos
/flannel
/version.Version
=$(FLANNEL_VERSION
) \
25 ifeq ($(BR2_STATIC_LIBS
),y
)
26 FLANNEL_GLDFLAGS
+= -extldflags
'-static'
29 define FLANNEL_CONFIGURE_CMDS
30 # Put sources at prescribed GOPATH location.
31 mkdir
-p
$(@D
)/gopath
/src
/github.com
/coreos
32 ln
-s
$(@D
) $(@D
)/gopath
/src
/github.com
/coreos
/flannel
35 define FLANNEL_BUILD_CMDS
36 cd
$(@D
) && $(FLANNEL_MAKE_ENV
) $(HOST_DIR
)/usr
/bin
/go \
37 build
-v
-o
$(@D
)/bin
/flanneld
-ldflags "$(FLANNEL_GLDFLAGS)" .
40 define FLANNEL_INSTALL_TARGET_CMDS
41 # Install flannel to its well known location.
42 $(INSTALL
) -D
-m
0755 $(@D
)/bin
/flanneld
$(TARGET_DIR
)/opt
/bin
/flanneld
43 $(INSTALL
) -D
-m
0755 $(@D
)/dist/mk-docker-opts.sh
$(TARGET_DIR
)/opt
/bin
/mk-docker-opts.sh
46 $(eval
$(generic-package
))