Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright (C) 2009-2012 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=ipset
  10. PKG_VERSION:=6.14
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=http://ipset.netfilter.org
  14. PKG_MD5SUM:=70f2d4c054592236dcda285855a4ee58
  15. PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/ipset/Default
  20. DEPENDS:= @(!(TARGET_ps3||TARGET_pxcab)||BROKEN)
  21. endef
  22. define Package/ipset
  23. $(call Package/ipset/Default)
  24. SECTION:=net
  25. CATEGORY:=Network
  26. DEPENDS+= +iptables-mod-ipset +kmod-ipt-ipset +libmnl
  27. TITLE:=IPset administration utility
  28. URL:=http://ipset.netfilter.org/
  29. endef
  30. CONFIGURE_ARGS += \
  31. --with-kbuild="$(LINUX_DIR)"
  32. MAKE_FLAGS += \
  33. ARCH="$(LINUX_KARCH)"
  34. IPSET_MODULES:= \
  35. ipset/ip_set \
  36. ipset/ip_set_bitmap_ip \
  37. ipset/ip_set_bitmap_ipmac \
  38. ipset/ip_set_bitmap_port \
  39. ipset/ip_set_hash_ip \
  40. ipset/ip_set_hash_ipport \
  41. ipset/ip_set_hash_ipportip \
  42. ipset/ip_set_hash_ipportnet \
  43. ipset/ip_set_hash_net \
  44. ipset/ip_set_hash_netiface \
  45. ipset/ip_set_hash_netport \
  46. ipset/ip_set_list_set \
  47. xt_set \
  48. define Build/Compile
  49. $(call Build/Compile/Default)
  50. $(call Build/Compile/Default,modules)
  51. endef
  52. define Package/ipset/install
  53. $(INSTALL_DIR) $(1)/usr/sbin
  54. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
  55. $(INSTALL_DIR) $(1)/usr/lib
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
  57. endef
  58. define KernelPackage/ipt-ipset
  59. $(call Package/ipset/Default)
  60. SUBMENU:=Netfilter Extensions
  61. TITLE:=IPset netfilter modules
  62. DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
  63. FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
  64. AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
  65. endef
  66. $(eval $(call BuildPackage,ipset))
  67. $(eval $(call KernelPackage,ipt-ipset))