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.

50 lines
1.5 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=cni-plugins-nft
  3. PKG_VERSION:=1.0.5
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://github.com/greenpau/cni-plugins/archive/v$(PKG_VERSION)
  7. PKG_HASH:=c8cbdfe43c144cf0df834555698312e8fd3daf6f2c5ac35e7959b90b91b154ad
  8. PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
  9. PKG_LICENSE:=Apache-2.0
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_BUILD_DEPENDS:=golang/host
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_USE_MIPS16:=0
  14. GO_PKG:=github.com/greenpau/cni-plugins/
  15. GO_PKG_BUILD_PKG:=github.com/greenpau/cni-plugins/cmd/cni-nftables-portmap \
  16. github.com/greenpau/cni-plugins/cmd/cni-nftables-firewall
  17. include $(INCLUDE_DIR)/package.mk
  18. include ../../lang/golang/golang-package.mk
  19. PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
  20. define Package/cni-plugins-nft
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=CNI Plugins compatible with nftables
  24. URL:=https://github.com/greenpau/cni-plugins/
  25. DEPENDS:=$(GO_ARCH_DEPENDS) +nftables
  26. endef
  27. define Package/cni-plugins-nft/description
  28. CNI Plugins maintained by the CNI team do not support nftables, except when used with systemd.
  29. These plugins do.
  30. - cni-nftables-portmap
  31. - cni-nftables-firewall
  32. endef
  33. define Package/cni-plugins-nft/install
  34. $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
  35. $(INSTALL_DIR) $(1)/usr/lib/cni
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/lib/cni
  37. endef
  38. $(eval $(call GoBinPackage,cni-plugins-nft))
  39. $(eval $(call BuildPackage,cni-plugins-nft))