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.

114 lines
3.8 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=podman
  3. PKG_VERSION:=3.4.2
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://github.com/containers/podman/archive/v$(PKG_VERSION)
  7. PKG_HASH:=b0c4f9a11eb500b1d440d5e51a6c0c632aa4ac458e2dc0362f50f999eb7fbf31
  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/v3/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. URL:=https://podman.io
  35. endef
  36. define Package/podman
  37. $(call Package/podman/Default)
  38. DEPENDS:=$(GO_ARCH_DEPENDS) +conmon +cni +cni-plugins +btrfs-progs +glib2 +gnupg2 +iptables +libgpg-error +libseccomp +libgpgme +nsenter +zoneinfo-simple +kmod-veth
  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:=$(GO_ARCH_DEPENDS) +conmon +cni +cni-plugins +btrfs-progs +glib2 +gnupg2 +iptables +libgpg-error +libseccomp +libgpgme +nsenter +zoneinfo-simple +kmod-veth +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,apparmor
  67. else
  68. GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper,apparmor
  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_DATA) $(DL_DIR)/default-policy.json-362f70b056 $(1)/etc/containers/policy.json
  79. $(INSTALL_DATA) $(DL_DIR)/registries.fedora-da9a9c8778 $(1)/etc/containers/registries.conf
  80. $(INSTALL_DATA) $(PKG_BUILD_DIR)/vendor/github.com/containers/storage/storage.conf $(1)/etc/containers/storage.conf
  81. $(INSTALL_DATA) ./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)/usr/share/containers
  85. $(INSTALL_DATA) $(PKG_BUILD_DIR)/vendor/github.com/containers/common/pkg/seccomp/seccomp.json $(1)/usr/share/containers/
  86. $(INSTALL_DIR) $(1)/etc/init.d
  87. $(INSTALL_BIN) ./files/podman.init $(1)/etc/init.d/podman
  88. $(SED) 's/driver = \"\"/driver = \"overlay\"/g' $(1)/etc/containers/storage.conf
  89. endef
  90. Package/podman-selinux/install = $(Package/podman/install)
  91. $(eval $(call GoBinPackage,podman))
  92. $(eval $(call BuildPackage,podman))
  93. $(eval $(call GoBinPackage,podman-selinux))
  94. $(eval $(call BuildPackage,podman-selinux))