Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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_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_ipport \
  39. ipset/ip_set_hash_ipportip \
  40. ipset/ip_set_hash_ipportnet \
  41. ipset/ip_set_hash_net \
  42. ipset/ip_set_hash_netiface \
  43. ipset/ip_set_hash_netport \
  44. ipset/ip_set_list_set \
  45. xt_set \
  46. define Build/Compile
  47. $(call Build/Compile/Default)
  48. $(call Build/Compile/Default,modules)
  49. endef
  50. define Package/ipset/install
  51. $(INSTALL_DIR) $(1)/usr/sbin
  52. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
  55. endef
  56. define KernelPackage/ipt-ipset
  57. SUBMENU:=Netfilter Extensions
  58. TITLE:=IPset netfilter modules
  59. DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
  60. FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
  61. AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
  62. endef
  63. $(eval $(call BuildPackage,ipset))
  64. $(eval $(call KernelPackage,ipt-ipset))