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.

112 lines
3.5 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=podman
  3. PKG_VERSION:=3.0.1
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_HASH:=259e682d6e90595573fe8880e0252cc8b08c813e19408b911c43383a6edd6852
  6. PKG_SOURCE_URL:=https://github.com/containers/podman/archive/v$(PKG_VERSION)
  7. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  8. PKG_LICENSE:=Apache-2.0
  9. PKG_LICENSE_FILES:=LICENSE
  10. PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
  11. PKG_BUILD_DEPENDS:=golang/host protobuf/host
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_USE_MIPS16:=0
  14. GO_PKG:=github.com/containers/podman/
  15. GO_PKG_BUILD_PKG:=github.com/containers/podman/v2/cmd/podman/
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../../lang/golang/golang-package.mk
  18. define Download/default-registries
  19. URL:=https://raw.githubusercontent.com/projectatomic/registries/da9a9c87781823f45401ca49da04e269c9e3100e
  20. URL_FILE:=registries.fedora
  21. FILE:=registries.fedora-da9a9c8778
  22. HASH:=bc2b58c209aa8ca35b6814ec9a3c64716d4970b884ade460b65000e56024dfee
  23. endef
  24. define Download/default-policy
  25. URL:=https://raw.githubusercontent.com/containers/skopeo/362f70b056a1f5d2bd4184527a0ae0d20c4d35d3
  26. URL_FILE:=default-policy.json
  27. FILE:=default-policy.json-362f70b056
  28. HASH:=cddfaa8e6a7e5497b67cc0dd8e8517058d0c97de91bf46fff867528415f2d946
  29. endef
  30. define Package/podman/Default
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. TITLE:=Podman
  34. DEPENDS:=$(GO_ARCH_DEPENDS) +conmon +cni +cni-plugins +btrfs-progs +glib2 +gnupg2 +iptables +libgpg-error +libseccomp +libgpgme +nsenter +zoneinfo-simple +kmod-veth
  35. URL:=https://podman.io
  36. endef
  37. define Package/podman
  38. $(call Package/podman/Default)
  39. CONFLICTS:=podman-selinux
  40. VARIANT:=default
  41. PROVIDES:=podman
  42. endef
  43. define Package/podman-selinux
  44. $(call Package/podman/Default)
  45. TITLE+= with SELinux support
  46. DEPENDS+= libselinux
  47. VARIANT:=selinux
  48. PROVIDES:=podman
  49. endef
  50. define Package/podman/description
  51. Podman: A tool for managing OCI containers and pods
  52. endef
  53. define Package/podman-selinux/description
  54. Podman: A tool for managing OCI containers and pods
  55. SELinux enabled.
  56. endef
  57. define Package/podman/conffiles
  58. /etc/containers/policy.json
  59. /etc/containers/storage.conf
  60. /etc/containers/registries.conf
  61. /etc/containers/containers.conf
  62. /etc/cni/net.d/87-podman-bridge.conflist
  63. endef
  64. Package/podman-selinux/conffiles = $(Package/podman/conffiles)
  65. ifeq ($(BUILD_VARIANT),selinux)
  66. GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper,selinux
  67. else
  68. GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper
  69. endif
  70. define Build/Prepare
  71. $(call Build/Prepare/Default)
  72. $(eval $(call Download,default-registries))
  73. $(eval $(call Download,default-policy))
  74. endef
  75. define Package/podman/install
  76. $(call GoPackage/Package/Install/Bin,$(1))
  77. $(INSTALL_DIR) $(1)/etc/containers
  78. $(INSTALL_CONF) $(DL_DIR)/default-policy.json-362f70b056 $(1)/etc/containers/policy.json
  79. $(INSTALL_CONF) $(DL_DIR)/registries.fedora-da9a9c8778 $(1)/etc/containers/registries.conf
  80. $(INSTALL_CONF) $(PKG_BUILD_DIR)/vendor/github.com/containers/storage/storage.conf $(1)/etc/containers/storage.conf
  81. $(INSTALL_CONF) ./files/containers.conf $(1)/etc/containers/containers.conf
  82. $(INSTALL_DIR) $(1)/etc/cni/net.d
  83. $(INSTALL_CONF) $(PKG_BUILD_DIR)/cni/87-podman-bridge.conflist $(1)/etc/cni/net.d/
  84. $(INSTALL_DIR) $(1)/etc/init.d
  85. $(INSTALL_BIN) ./files/podman.init $(1)/etc/init.d/podman
  86. $(SED) 's/driver = \"\"/driver = \"overlay\"/g' $(1)/etc/containers/storage.conf
  87. endef
  88. Package/podman-selinux/install = $(Package/podman/install)
  89. $(eval $(call GoBinPackage,podman))
  90. $(eval $(call BuildPackage,podman))
  91. $(eval $(call GoBinPackage,podman-selinux))
  92. $(eval $(call BuildPackage,podman-selinux))