package/python-simplejson: bump version to 3.8.2
[buildroot-gz.git] / package / runc / runc.mk
blobe2ab5edf2d5b929b20e7e720d5ccb13ac05ad89d
1 ################################################################################
3 # runc
5 ################################################################################
7 RUNC_VERSION = cc29e3dded8e27ba8f65738f40d251c885030a28
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) \
16 CGO_ENABLED=1 \
17 GOBIN="$(@D)/bin" \
18 GOPATH="$(RUNC_GOPATH)" \
19 PATH=$(BR_PATH)
21 RUNC_GLDFLAGS = \
22 -X main.gitCommit=$(RUNC_VERSION)
24 ifeq ($(BR2_STATIC_LIBS),y)
25 FLANNEL_GLDFLAGS += -extldflags '-static'
26 endif
28 RUNC_GOTAGS = cgo static_build
30 ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
31 RUNC_GOTAGS += seccomp
32 RUNC_DEPENDENCIES += libseccomp host-pkgconf
33 endif
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
38 endef
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)" .
44 endef
46 define RUNC_INSTALL_TARGET_CMDS
47 $(INSTALL) -D -m 0755 $(@D)/bin/runc $(TARGET_DIR)/usr/bin/runc
48 endef
50 $(eval $(generic-package))