Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.20.1
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=http://ipset.netfilter.org
  14. PKG_MD5SUM:=8af741492752fbf24d3a28a9d1473d40
  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+= +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. SHELL="$(BASH)"
  35. IPSET_MODULES:= \
  36. ipset/ip_set \
  37. ipset/ip_set_bitmap_ip \
  38. ipset/ip_set_bitmap_ipmac \
  39. ipset/ip_set_bitmap_port \
  40. ipset/ip_set_hash_ip \
  41. ipset/ip_set_hash_ipport \
  42. ipset/ip_set_hash_ipportip \
  43. ipset/ip_set_hash_ipportnet \
  44. ipset/ip_set_hash_net \
  45. ipset/ip_set_hash_netiface \
  46. ipset/ip_set_hash_netport \
  47. ipset/ip_set_list_set \
  48. xt_set \
  49. define Build/Compile
  50. $(call Build/Compile/Default)
  51. $(call Build/Compile/Default,modules)
  52. endef
  53. define Package/ipset/install
  54. $(INSTALL_DIR) $(1)/usr/sbin
  55. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
  58. endef
  59. define KernelPackage/ipt-ipset
  60. $(call Package/ipset/Default)
  61. SUBMENU:=Netfilter Extensions
  62. TITLE:=IPset netfilter modules
  63. DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
  64. FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
  65. AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
  66. endef
  67. $(eval $(call BuildPackage,ipset))
  68. $(eval $(call KernelPackage,ipt-ipset))