Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.24
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=http://ipset.netfilter.org
  14. PKG_MD5SUM:=8831b8f01458bf2abacc222884195a62
  15. PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/ipset
  21. SECTION:=net
  22. CATEGORY:=Network
  23. DEPENDS+= +kmod-ipt-ipset +libmnl
  24. TITLE:=IPset administration utility
  25. URL:=http://ipset.netfilter.org/
  26. endef
  27. CONFIGURE_ARGS += \
  28. --with-kbuild="$(LINUX_DIR)"
  29. MAKE_FLAGS += \
  30. ARCH="$(LINUX_KARCH)" \
  31. SHELL="$(BASH)"
  32. IPSET_MODULES:= \
  33. ipset/ip_set \
  34. ipset/ip_set_bitmap_ip \
  35. ipset/ip_set_bitmap_ipmac \
  36. ipset/ip_set_bitmap_port \
  37. ipset/ip_set_hash_ip \
  38. ipset/ip_set_hash_ipmark \
  39. ipset/ip_set_hash_ipport \
  40. ipset/ip_set_hash_ipportip \
  41. ipset/ip_set_hash_ipportnet \
  42. ipset/ip_set_hash_net \
  43. ipset/ip_set_hash_netiface \
  44. ipset/ip_set_hash_netport \
  45. ipset/ip_set_list_set \
  46. xt_set \
  47. define Build/Compile
  48. $(call Build/Compile/Default)
  49. $(call Build/Compile/Default,modules)
  50. endef
  51. define Package/ipset/install
  52. $(INSTALL_DIR) $(1)/usr/sbin
  53. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
  56. endef
  57. define KernelPackage/ipt-ipset
  58. SUBMENU:=Netfilter Extensions
  59. TITLE:=IPset netfilter modules
  60. DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
  61. FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
  62. AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
  63. endef
  64. $(eval $(call BuildPackage,ipset))
  65. $(eval $(call KernelPackage,ipt-ipset))