2 # Copyright (C) 2009-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://ipset.netfilter.org
17 PKG_MD5SUM:=8af741492752fbf24d3a28a9d1473d40
19 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
24 include $(INCLUDE_DIR)/package.mk
26 define Package/ipset/Default
27 DEPENDS:= @(!(TARGET_ps3||TARGET_pxcab)||BROKEN)
31 $(call Package/ipset/Default)
34 DEPENDS+= +kmod-ipt-ipset +libmnl
35 TITLE:=IPset administration utility
36 URL:=http://ipset.netfilter.org/
40 --with-kbuild="$(LINUX_DIR)"
43 ARCH="$(LINUX_KARCH)" \
48 ipset/ip_set_bitmap_ip \
49 ipset/ip_set_bitmap_ipmac \
50 ipset/ip_set_bitmap_port \
51 ipset/ip_set_hash_ip \
52 ipset/ip_set_hash_ipport \
53 ipset/ip_set_hash_ipportip \
54 ipset/ip_set_hash_ipportnet \
55 ipset/ip_set_hash_net \
56 ipset/ip_set_hash_netiface \
57 ipset/ip_set_hash_netport \
58 ipset/ip_set_list_set \
62 $(call Build/Compile/Default)
63 $(call Build/Compile/Default,modules)
66 define Package/ipset/install
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
73 define KernelPackage/ipt-ipset
74 $(call Package/ipset/Default)
75 SUBMENU:=Netfilter Extensions
76 TITLE:=IPset netfilter modules
77 DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
78 FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
79 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
82 $(eval $(call BuildPackage,ipset))
83 $(eval $(call KernelPackage,ipt-ipset))