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