You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.1 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=runc
  3. PKG_VERSION:=1.0.0-rc8
  4. PKG_RELEASE:=1
  5. PKG_LICENSE:=Apache-2.0
  6. PKG_LICENSE_FILES:=LICENSE
  7. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  8. PKG_SOURCE_URL:=https://codeload.github.com/opencontainers/runc/tar.gz/v${PKG_VERSION}?
  9. PKG_HASH:=efe4ff9bbe49b19074346d65c914d809c0a3e90d062ea9619fe240f931f0b700
  10. PKG_SOURCE_VERSION:=425e105d5a03fabd737a126ad93d62a9eeede87f
  11. PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
  12. PKG_BUILD_DEPENDS:=golang/host
  13. PKG_BUILD_PARALLEL:=1
  14. PKG_USE_MIPS16:=0
  15. GO_PKG:=github.com/opencontainers/runc
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../../lang/golang/golang-package.mk
  18. define Package/runc/config
  19. config RUNC_SECCOMP
  20. depends on PACKAGE_runc
  21. bool "Enable support for seccomp in runc"
  22. default DOCKER_SECCOMP
  23. select KERNEL_SECCOMP
  24. select PACKAGE_libseccomp
  25. help
  26. Build runc with support for seccomp filters.
  27. Select libseccomp which also pulls-in the needed kernel features.
  28. endef
  29. define Package/runc
  30. SECTION:=utils
  31. CATEGORY:=Utilities
  32. TITLE:=runc container runtime
  33. URL:=https://www.opencontainers.org/
  34. DEPENDS:=$(GO_ARCH_DEPENDS) @TARGET_x86_64 +RUNC_SECCOMP:libseccomp
  35. MENU:=1
  36. endef
  37. define Package/runc/description
  38. runc is a CLI tool for spawning and running containers according to the OCI specification.
  39. endef
  40. GO_PKG_INSTALL_ALL:=1
  41. MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG)
  42. MAKE_VARS += \
  43. GOPATH=$(GO_PKG_BUILD_DIR) \
  44. GOCACHE=$(GO_PKG_CACHE_DIR) \
  45. GOTMPDIR=$(GO_PKG_TMP_DIR) \
  46. GOROOT_FINAL=$(GO_TARGET_ROOT) \
  47. CC=$(TARGET_CC) \
  48. CXX=$(TARGET_CXX) \
  49. $(call GoPackage/Environment)
  50. MAKE_FLAGS += \
  51. COMMIT=$(PKG_SOURCE_VERSION)
  52. ifeq ($(ARCH),mips)
  53. MAKE_FLAGS += EXTRA_FLAGS='-buildmode=default'
  54. endif
  55. ifeq ($(CONFIG_RUNC_SECCOMP),y)
  56. MAKE_FLAGS += BUILDTAGS='seccomp'
  57. else
  58. MAKE_FLAGS += BUILDTAGS=''
  59. endif
  60. define Build/Compile
  61. $(call Build/Compile/Default)
  62. endef
  63. # Avoid installing binaries
  64. define Build/InstallDev
  65. $(call Build/Compile/Default,clean)
  66. $(call GoPackage/Build/InstallDev,$(1))
  67. endef
  68. define Package/runc/install
  69. $(INSTALL_DIR) $(1)/usr/sbin/
  70. $(INSTALL_BIN) $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/runc $(1)/usr/sbin/
  71. endef
  72. $(eval $(call BuildPackage,runc))