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
:=eca2e3f4f4904814e3a301539876fae6
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
://jengelh.medozas.de
/projects
/xtables
/
33 --with-kbuild
="$(LINUX_DIR)" \
34 --with-xtables
="$(STAGING_DIR)/usr" \
35 --with-xtlibdir
="/usr/lib/iptables" \
38 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
39 ARCH
="$(LINUX_KARCH)" \
40 CROSS_COMPILE
="$(TARGET_CROSS)" \
41 DESTDIR
="$(PKG_INSTALL_DIR)" \
46 # 1: extension/module suffix used in package name
47 # 2: extension/module display name used in package title/description
48 # 3: list of extensions/modules to package
49 # 4: module load priority
53 define Package
/iptables-mod-
$(1)
54 $$(call Package
/xtables-addons
)
55 TITLE
:=$(2) iptables extension
56 DEPENDS
:=iptables
+kmod-ipt-
$(1)
59 define Package
/iptables-mod-
$(1)/install
60 $(INSTALL_DIR
) $$(1)/usr
/lib
/iptables
63 $(PKG_INSTALL_DIR
)/usr
/lib
/iptables
/lib
$$$$$$$${m}.so \
64 $$(1)/usr
/lib
/iptables
/ ; \
68 $$(eval
$$(call BuildPackage
,iptables-mod-
$(1)))
70 define KernelPackage
/ipt-
$(1)
71 SUBMENU
:=Netfilter Extensions
72 TITLE
:=$(2) netfilter module
73 DEPENDS
:=@LINUX_2_6 kmod-ipt-core
$(5)
74 FILES
:=$(PKG_BUILD_DIR
)/extensions
/$(3).
$(LINUX_KMOD_SUFFIX
)
75 AUTOLOAD
:=$(call AutoLoad
,$(4),$(3))
78 $$(eval
$$(call KernelPackage
,ipt-
$(1)))
82 define KernelPackage
/compat-xtables
83 SUBMENU
:=Netfilter Extensions
84 TITLE
:=API compatibilty layer module
86 FILES
:=$(PKG_BUILD_DIR
)/extensions
/compat_xtables.
$(LINUX_KMOD_SUFFIX
)
87 AUTOLOAD
:=$(call AutoLoad
,45,compat_xtables
)
90 $(eval
$(call KernelPackage
,compat-xtables
))
92 $(eval
$(call BuildTemplate
,chaos
,CHAOS
,xt_CHAOS
,47,+kmod-compat-xtables
+kmod-ipt-delude
+kmod-ipt-tarpit
))
93 $(eval
$(call BuildTemplate
,condition
,condition
,xt_condition
,46))
94 $(eval
$(call BuildTemplate
,delude
,DELUDE
,xt_DELUDE
,46,+kmod-compat-xtables
))
95 $(eval
$(call BuildTemplate
,tarpit
,TARPIT
,xt_TARPIT
,46,+kmod-compat-xtables
))
96 $(eval
$(call BuildTemplate
,ipp2p
,ipp2p
,xt_ipp2p
,46))