1 ################################################################################
5 ################################################################################
7 RUNC_VERSION
= 9df8b306d01f59d3a8029be411de015b7304dd8f
8 RUNC_SITE
= $(call github
,opencontainers
,runc
,$(RUNC_VERSION
))
9 RUNC_LICENSE
= Apache-2.0
10 RUNC_LICENSE_FILES
= LICENSE
12 RUNC_DEPENDENCIES
= host-go
14 RUNC_GOPATH
= "$(@D)/Godeps/_workspace"
15 RUNC_MAKE_ENV
= $(HOST_GO_TARGET_ENV
) \
18 GOPATH
="$(RUNC_GOPATH)" \
22 -X main.gitCommit
=$(RUNC_VERSION
)
24 ifeq ($(BR2_STATIC_LIBS
),y
)
25 RUNC_GLDFLAGS
+= -extldflags
'-static'
28 RUNC_GOTAGS
= cgo static_build
30 ifeq ($(BR2_PACKAGE_LIBSECCOMP
),y
)
31 RUNC_GOTAGS
+= seccomp
32 RUNC_DEPENDENCIES
+= libseccomp host-pkgconf
35 define RUNC_CONFIGURE_CMDS
36 mkdir
-p
$(RUNC_GOPATH
)/src
/github.com
/opencontainers
37 ln
-s
$(@D
) $(RUNC_GOPATH
)/src
/github.com
/opencontainers
/runc
40 define RUNC_BUILD_CMDS
41 cd
$(@D
) && $(RUNC_MAKE_ENV
) $(HOST_DIR
)/usr
/bin
/go \
42 build
-v
-o
$(@D
)/bin
/runc \
43 -tags "$(RUNC_GOTAGS)" -ldflags "$(RUNC_GLDFLAGS)" .
46 define RUNC_INSTALL_TARGET_CMDS
47 $(INSTALL
) -D
-m
0755 $(@D
)/bin
/runc
$(TARGET_DIR
)/usr
/bin
/runc
50 $(eval
$(generic-package
))