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
:=d104007fdf5ea64fef774c22b1c0a97b
19 include $(INCLUDE_DIR
)/package.mk
24 DEPENDS
:= @LINUX_2_6
+iptables-mod-ipset
+kmod-ipt-ipset
25 TITLE
:=IPset administration utility
26 URL
:=http
://ipset.netfilter.org
/
29 include $(INCLUDE_DIR
)/kernel-defaults.mk
31 IPSET_MAKEOPTS
:= -C
$(PKG_BUILD_DIR
) \
32 $(TARGET_CONFIGURE_OPTS
) \
33 COPT_FLAGS
="$(TARGET_CFLAGS)" \
34 LDFLAGS
="-rdynamic -static-libgcc" \
35 NO_EXTRA_WARN_FLAGS
=yes \
36 KERNEL_DIR
="$(LINUX_DIR)" \
45 ip_set_ipportnethash \
56 mkdir
-p
$(PKG_INSTALL_DIR
)
57 $(MAKE
) $(IPSET_MAKEOPTS
) binaries
58 $(MAKE
) $(KERNEL_MAKEOPTS
) M
="$(PKG_BUILD_DIR)/kernel" IP_NF_SET_MAX
="256" IP_NF_SET_HASHSIZE
="1024" modules
59 $(MAKE
) $(IPSET_MAKEOPTS
) DESTDIR
="$(PKG_INSTALL_DIR)" binaries_install
62 define Package
/ipset
/install
63 $(INSTALL_DIR
) $(1)/usr
/sbin
64 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipset
$(1)/usr
/sbin
/
65 $(INSTALL_DIR
) $(1)/usr
/lib
/ipset
66 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ipset
/libipset
*.so
$(1)/usr
/lib
/ipset
/
69 define KernelPackage
/ipt-ipset
70 SUBMENU
:=Netfilter Extensions
71 TITLE
:=IPset netfilter modules
72 DEPENDS
:= @LINUX_2_6 kmod-ipt-core
73 FILES
:=$(foreach mod
,$(IPSET_MODULES
),$(PKG_BUILD_DIR
)/kernel
/$(mod
).ko
)
74 AUTOLOAD
:=$(call AutoLoad
,46,$(IPSET_MODULES
))
77 $(eval
$(call BuildPackage
,ipset
))
78 $(eval
$(call KernelPackage
,ipt-ipset
))