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.

84 lines
2.0 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=runc
  3. PKG_VERSION:=1.0.0-rc8+91-3e425f80
  4. PKG_RELEASE:=4
  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 += $(call GoPackage/Environment)
  45. MAKE_FLAGS += \
  46. COMMIT=$(PKG_SOURCE_VERSION)
  47. ifeq ($(ARCH),mips)
  48. MAKE_FLAGS += EXTRA_FLAGS='-buildmode=default'
  49. endif
  50. ifeq ($(CONFIG_RUNC_SECCOMP),y)
  51. MAKE_FLAGS += BUILDTAGS='seccomp'
  52. else
  53. MAKE_FLAGS += BUILDTAGS=''
  54. endif
  55. define Build/Compile
  56. $(call Build/Compile/Default)
  57. endef
  58. # Avoid installing binaries
  59. define Build/InstallDev
  60. $(call Build/Compile/Default,clean)
  61. rm -f $(STAMP_BUILT)
  62. $(call GoPackage/Build/InstallDev,$(1))
  63. endef
  64. define Package/runc/install
  65. $(INSTALL_DIR) $(1)/usr/sbin/
  66. $(INSTALL_BIN) $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)/runc $(1)/usr/sbin/
  67. endef
  68. $(eval $(call BuildPackage,runc))