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.

90 lines
2.2 KiB

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