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.

83 lines
2.7 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=oci-runtime-tools
  3. PKG_VERSION:=1.0.0-pre20210122
  4. PKG_RELEASE:=1
  5. PKG_LICENSE:=Apache-2.0
  6. PKG_LICENSE_FILES:=LICENSE
  7. PKG_SOURCE_PROTO:=git
  8. PKG_SOURCE_NAME:=runtime-tools
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://github.com/opencontainers/runtime-tools.git
  11. PKG_SOURCE_VERSION:=453547deb724af135587e654f52d86b8619f21b9
  12. PKG_MIRROR_HASH:=34f3aefc4f6f3bb93330ec7cbeb2eb987b82184da53d453e8b04b5750faa8728
  13. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  14. PKG_BUILD_DEPENDS:=golang/host
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_USE_MIPS16:=0
  17. GO_PKG:=github.com/opencontainers/runtime-tools/
  18. GO_PKG_LDFLAGS_X:=main.gitCommit=$(PKG_SOURCE_VERSION) main.version=$(PKG_SOURCE_VERSION)
  19. include $(INCLUDE_DIR)/package.mk
  20. include ../../lang/golang/golang-package.mk
  21. define Package/oci-runtime-tool
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=oci-runtime-tool
  25. URL:=https://github.com/opencontainers/runtime-tools
  26. DEPENDS:=$(GO_ARCH_DEPENDS)
  27. endef
  28. define Package/oci-runtime-tool/description
  29. OCI (Open Container Initiative) runtime tools
  30. Generate OCI runtime spec configuration files and validate OCI bundles.
  31. endef
  32. define Package/oci-runtime-tests
  33. SECTION:=utils
  34. CATEGORY:=Utilities
  35. TITLE:=OCI runtimetest tool
  36. URL:=https://github.com/opencontainers/runtime-tools
  37. DEPENDS:=@(i386||i686||x86_64) oci-runtime-tool +tar
  38. endef
  39. define Package/oci-runtime-tests/description
  40. OCI (Open Container Initiative) runtime tools
  41. This package provides test cases as well as artifacts required to
  42. validate an OCI runtime.
  43. Best used in combination with a TAP consumer like 'node-tap',
  44. installable via npm.
  45. endef
  46. define Build/Compile
  47. $(call GoPackage/Build/Compile)
  48. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  49. endef
  50. define Package/oci-runtime-tool/install
  51. $(INSTALL_DIR) $(1)/usr/bin
  52. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/oci-runtime-tool $(1)/usr/bin
  53. endef
  54. define Package/oci-runtime-tests/install
  55. $(INSTALL_DIR) $(1)/usr/libexec/oci-runtime-test
  56. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/runtimetest $(1)/usr/libexec/oci-runtime-test/
  57. ( cd $(PKG_BUILD_DIR) ; $(FIND) ./validation/ -name *.go | grep -v util | \
  58. xargs -I'%' -n 1 basename % .go | while read testbin; do \
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${testbin} \
  60. $(1)/usr/libexec/oci-runtime-test/$$$${testbin}.t ; \
  61. done )
  62. ifdef CONFIG_x86_64
  63. $(INSTALL_DATA) $(PKG_BUILD_DIR)/rootfs-amd64.tar.gz $(1)/usr/libexec/oci-runtime-test
  64. endif
  65. $(INSTALL_DATA) $(PKG_BUILD_DIR)/rootfs-386.tar.gz $(1)/usr/libexec/oci-runtime-test
  66. endef
  67. $(eval $(call GoBinPackage,oci-runtime-tools))
  68. $(eval $(call BuildPackage,oci-runtime-tool))
  69. $(eval $(call BuildPackage,oci-runtime-tests))