Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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/Default
  21. DEPENDS:= @(!(TARGET_ps3||TARGET_pxcab)||BROKEN)
  22. endef
  23. define Package/ipset
  24. $(call Package/ipset/Default)
  25. SECTION:=net
  26. CATEGORY:=Network
  27. DEPENDS+= +kmod-ipt-ipset +libmnl
  28. TITLE:=IPset administration utility
  29. URL:=http://ipset.netfilter.org/
  30. endef
  31. CONFIGURE_ARGS += \
  32. --with-kbuild="$(LINUX_DIR)"
  33. MAKE_FLAGS += \
  34. ARCH="$(LINUX_KARCH)" \
  35. SHELL="$(BASH)"
  36. IPSET_MODULES:= \
  37. ipset/ip_set \
  38. ipset/ip_set_bitmap_ip \
  39. ipset/ip_set_bitmap_ipmac \
  40. ipset/ip_set_bitmap_port \
  41. ipset/ip_set_hash_ip \
  42. ipset/ip_set_hash_ipport \
  43. ipset/ip_set_hash_ipportip \
  44. ipset/ip_set_hash_ipportnet \
  45. ipset/ip_set_hash_net \
  46. ipset/ip_set_hash_netiface \
  47. ipset/ip_set_hash_netport \
  48. ipset/ip_set_list_set \
  49. xt_set \
  50. define Build/Compile
  51. $(call Build/Compile/Default)
  52. $(call Build/Compile/Default,modules)
  53. endef
  54. define Package/ipset/install
  55. $(INSTALL_DIR) $(1)/usr/sbin
  56. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
  59. endef
  60. define KernelPackage/ipt-ipset
  61. $(call Package/ipset/Default)
  62. SUBMENU:=Netfilter Extensions
  63. TITLE:=IPset netfilter modules
  64. DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
  65. FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
  66. AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
  67. endef
  68. $(eval $(call BuildPackage,ipset))
  69. $(eval $(call KernelPackage,ipt-ipset))