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
11 PKG_NAME
:=xtables-addons
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_MD5SUM
:=5a8d2edbf5a3470bba58d6a60c350805
17 PKG_SOURCE_URL
:=@SF
/xtables-addons
18 PKG_BUILD_DEPENDS
:=iptables
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/xtables-addons
25 TITLE
:=Extensions not distributed in the main Xtables
26 URL
:=http
://xtables-addons.sourceforge.net
/
30 $(call Package
/xtables-addons
)
31 TITLE
:=IPset administration utility
32 DEPENDS
:= @LINUX_2_6
+iptables-mod-ipset
38 --with-kbuild
="$(LINUX_DIR)" \
39 --with-xtables
="$(STAGING_DIR)/usr" \
40 --with-xtlibdir
="/usr/lib/iptables" \
58 ipset
/ip_set_ipporthash \
60 ipset
/ip_set_iptreemap \
61 ipset
/ip_set_macipmap \
62 ipset
/ip_set_nethash \
63 ipset
/ip_set_portmap \
68 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
69 ARCH
="$(LINUX_KARCH)" \
70 CROSS_COMPILE
="$(TARGET_CROSS)" \
71 DESTDIR
="$(PKG_INSTALL_DIR)" \
76 # 1: extension/module suffix used in package name
77 # 2: extension/module display name used in package title/description
78 # 3: list of extensions to package
79 # 4: list of modules to package
80 # 5: module load priority
85 define Package
/iptables-mod-
$(1)
86 $$(call Package
/xtables-addons
)
88 TITLE
:=$(2) iptables extension
89 DEPENDS
:= @LINUX_2_6 iptables
$(if
$(4),+kmod-ipt-
$(1))
92 define Package
/iptables-mod-
$(1)/install
93 $(INSTALL_DIR
) $$(1)/usr
/lib
/iptables
96 $(PKG_INSTALL_DIR
)/usr
/lib
/iptables
/lib
$$$$$$$${m}.so \
97 $$(1)/usr
/lib
/iptables
/ ; \
101 $$(eval
$$(call BuildPackage
,iptables-mod-
$(1)))
105 define KernelPackage
/ipt-
$(1)
106 SUBMENU
:=Netfilter Extensions
107 TITLE
:=$(2) netfilter module
108 DEPENDS
:= @LINUX_2_6 kmod-ipt-core
$(6)
109 FILES
:=$(foreach mod
,$(4),$(PKG_BUILD_DIR
)/extensions
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
110 AUTOLOAD
:=$(call AutoLoad
,$(5),$(notdir $(4)))
113 $$(eval
$$(call KernelPackage
,ipt-
$(1)))
118 define Package
/ipset
/install
119 $(INSTALL_DIR
) $(1)/usr
/sbin
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipset
$(1)/usr
/sbin
/
123 $(eval
$(call BuildPackage
,ipset
))
125 #$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS))
126 $(eval
$(call BuildTemplate
,compat-xtables
,API compatibilty layer
,,compat_xtables
,45,))
127 $(eval
$(call BuildTemplate
,chaos
,CHAOS
,xt_CHAOS
,xt_CHAOS
,47,+kmod-ipt-compat-xtables
+kmod-ipt-delude
+kmod-ipt-tarpit
))
128 $(eval
$(call BuildTemplate
,condition
,Condition
,xt_condition
,xt_condition
,46,))
129 $(eval
$(call BuildTemplate
,delude
,DELUDE
,xt_DELUDE
,xt_DELUDE
,46,+kmod-ipt-compat-xtables
))
130 $(eval
$(call BuildTemplate
,tarpit
,TARPIT
,xt_TARPIT
,xt_TARPIT
,46,+kmod-ipt-compat-xtables
))
131 $(eval
$(call BuildTemplate
,ipp2p
,IPP2P
,xt_ipp2p
,xt_ipp2p
,46,))
132 $(eval
$(call BuildTemplate
,ipset
,IPset
,$(IPSET_EXT
),$(IPSET_MOD
),46,))