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.

91 lines
2.3 KiB

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