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.

82 lines
2.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=crun
  3. PKG_VERSION:=0.18
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL:=https://github.com/containers/crun.git
  7. PKG_SOURCE_DATE:=2021-03-18
  8. PKG_SOURCE_VERSION:=496e81bdd69f117f10e4477e4204e4611a94b68f
  9. PKG_MIRROR_HASH:=26941b0d84bbeabeb5e982af48d131f55d0aa16f4a2f2ca3279a5c812cdeea8b
  10. PKG_BUILD_DEPENDS:=argp-standalone
  11. PKG_BUILD_PARALLEL:=1
  12. PKG_FIXUP:=autoreconf
  13. PKG_INSTALL:=1
  14. PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/crun
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. TITLE:=crun
  22. URL:=https://github.com/containers/crun
  23. DEPENDS:=+libseccomp +libcap
  24. endef
  25. define Package/crun/description
  26. A fast and low-memory footprint OCI Container Runtime fully written in C.
  27. endef
  28. CONFIGURE_ARGS+= \
  29. --disable-systemd \
  30. --enable-embedded-yajl \
  31. --enable-caps \
  32. --enable-dl \
  33. --enable-seccomp \
  34. --enable-bpf
  35. define Build/Prepare
  36. $(call Build/Prepare/Default)
  37. $(SED) '/#include <git-version.h>/d' $(PKG_BUILD_DIR)/src/crun.c
  38. endef
  39. define Build/Configure
  40. $(call Build/Configure/Default)
  41. $(SED) '/#define PACKAGE \"/d' $(PKG_BUILD_DIR)/config.h
  42. $(SED) '/#define VERSION \"/d' $(PKG_BUILD_DIR)/config.h
  43. $(SED) '/#define GIT_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
  44. $(SED) '/#define PACKAGE_BUGREPORT \"/d' $(PKG_BUILD_DIR)/config.h
  45. $(SED) '/#define PACKAGE_NAME \"/d' $(PKG_BUILD_DIR)/config.h
  46. $(SED) '/#define PACKAGE_STRING \"/d' $(PKG_BUILD_DIR)/config.h
  47. $(SED) '/#define PACKAGE_TARNAME \"/d' $(PKG_BUILD_DIR)/config.h
  48. $(SED) '/#define PACKAGE_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
  49. echo "#define PACKAGE \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
  50. echo "#define VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
  51. echo "#define PACKAGE_NAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
  52. echo "#define PACKAGE_VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
  53. echo "#define PACKAGE_STRING \"$(PKG_NAME) $(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
  54. echo "#define PACKAGE_TARNAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
  55. echo "#define PACKAGE_BUGREPORT \"bugs@openwrt.org\"" >> $(PKG_BUILD_DIR)/config.h
  56. echo "#define GIT_VERSION \"$(PKG_SOURCE_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
  57. endef
  58. define Package/crun/install
  59. $(INSTALL_DIR) $(1)/usr/bin/
  60. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/crun $(1)/usr/bin/
  61. endef
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib
  64. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/crun $(1)/usr/bin/
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrun.* $(1)/usr/lib/
  66. endef
  67. $(eval $(call BuildPackage,crun))