2 # Copyright (C) 2009 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
:=9060d549a18c1c0794fa47a71343d627
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/ipset
/Default
22 DEPENDS
:= @LINUX_2_6 @
(!(TARGET_ps3||TARGET_pxcab
)||BROKEN
)
26 $(call Package
/ipset
/Default
)
29 DEPENDS
+= +iptables-mod-ipset
+kmod-ipt-ipset
30 TITLE
:=IPset administration utility
31 URL
:=http
://ipset.netfilter.org
/
34 include $(INCLUDE_DIR
)/kernel-defaults.mk
36 IPSET_MAKEOPTS
:= -C
$(PKG_BUILD_DIR
) \
37 $(TARGET_CONFIGURE_OPTS
) \
38 COPT_FLAGS
="$(TARGET_CFLAGS)" \
39 LDFLAGS
="-rdynamic -static-libgcc" \
40 NO_EXTRA_WARN_FLAGS
=yes \
41 KERNEL_DIR
="$(LINUX_DIR)" \
50 ip_set_ipportnethash \
61 mkdir
-p
$(PKG_INSTALL_DIR
)
62 $(MAKE
) $(IPSET_MAKEOPTS
) binaries
63 $(MAKE
) $(KERNEL_MAKEOPTS
) M
="$(PKG_BUILD_DIR)/kernel" IP_NF_SET_MAX
="256" IP_NF_SET_HASHSIZE
="1024" modules
64 $(MAKE
) $(IPSET_MAKEOPTS
) DESTDIR
="$(PKG_INSTALL_DIR)" binaries_install
67 define Package
/ipset
/install
68 $(INSTALL_DIR
) $(1)/usr
/sbin
69 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipset
$(1)/usr
/sbin
/
70 $(INSTALL_DIR
) $(1)/usr
/lib
/ipset
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipset
/libipset
*.so
$(1)/usr
/lib
/ipset
/
74 define KernelPackage
/ipt-ipset
75 $(call Package
/ipset
/Default
)
76 SUBMENU
:=Netfilter Extensions
77 TITLE
:=IPset netfilter modules
78 DEPENDS
+= kmod-ipt-core
79 FILES
:=$(foreach mod
,$(IPSET_MODULES
),$(PKG_BUILD_DIR
)/kernel
/$(mod
).ko
)
80 AUTOLOAD
:=$(call AutoLoad
,46,$(IPSET_MODULES
))
83 $(eval
$(call BuildPackage
,ipset
))
84 $(eval
$(call KernelPackage
,ipt-ipset
))