2 # Copyright (C) 2009-2010 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
:=acfc41b5065706143e4a0570de458781
17 PKG_SOURCE_URL
:=@SF
/xtables-addons
18 PKG_BUILD_DEPENDS
:=iptables
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/xtables-addons
27 TITLE
:=Extensions not distributed in the main Xtables
28 URL
:=http
://xtables-addons.sourceforge.net
/
34 --with-kbuild
="$(LINUX_DIR)" \
35 --with-xtables
="$(STAGING_DIR)/usr" \
36 --with-xtlibdir
="/usr/lib/iptables" \
39 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
40 ARCH
="$(LINUX_KARCH)" \
41 CROSS_COMPILE
="$(TARGET_CROSS)" \
42 DESTDIR
="$(PKG_INSTALL_DIR)" \
44 LDFLAGS
="$(TARGET_LDFLAGS)" \
49 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
50 ARCH
="$(LINUX_KARCH)" \
51 CROSS_COMPILE
="$(TARGET_CROSS)" \
52 DESTDIR
="$(PKG_INSTALL_DIR)" \
54 LDFLAGS
="$(TARGET_LDFLAGS)" \
58 # 1: extension/module suffix used in package name
59 # 2: extension/module display name used in package title/description
60 # 3: list of extensions to package
61 # 4: list of modules to package
62 # 5: module load priority
67 define Package
/iptables-mod-
$(1)
68 $$(call Package
/xtables-addons
)
70 TITLE
:=$(2) iptables extension
71 DEPENDS
:= @
!LINUX_2_4 iptables
$(if
$(4),+kmod-ipt-
$(1))
74 define Package
/iptables-mod-
$(1)/install
75 $(INSTALL_DIR
) $$(1)/usr
/lib
/iptables
78 $(PKG_INSTALL_DIR
)/usr
/lib
/iptables
/lib
$$$$$$$${m}.so \
79 $$(1)/usr
/lib
/iptables
/ ; \
83 $$(eval
$$(call BuildPackage
,iptables-mod-
$(1)))
87 define KernelPackage
/ipt-
$(1)
88 SUBMENU
:=Netfilter Extensions
89 TITLE
:=$(2) netfilter module
90 DEPENDS
:= @
!LINUX_2_4 kmod-ipt-core
$(6)
91 FILES
:=$(foreach mod
,$(4),$(PKG_BUILD_DIR
)/extensions
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
92 AUTOLOAD
:=$(call AutoLoad
,$(5),$(notdir $(4)))
95 $$(eval
$$(call KernelPackage
,ipt-
$(1)))
100 #$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS))
101 $(eval
$(call BuildTemplate
,compat-xtables
,API compatibilty layer
,,compat_xtables
,45,))
102 $(eval
$(call BuildTemplate
,chaos
,CHAOS
,xt_CHAOS
,xt_CHAOS
,47,+kmod-ipt-compat-xtables
+kmod-ipt-delude
+kmod-ipt-tarpit
))
103 $(eval
$(call BuildTemplate
,condition
,Condition
,xt_condition
,xt_condition
,46,))
104 $(eval
$(call BuildTemplate
,delude
,DELUDE
,xt_DELUDE
,xt_DELUDE
,46,+kmod-ipt-compat-xtables
))
105 $(eval
$(call BuildTemplate
,tarpit
,TARPIT
,xt_TARPIT
,xt_TARPIT
,46,+kmod-ipt-compat-xtables
))
106 $(eval
$(call BuildTemplate
,tee
,TEE
,xt_TEE
,xt_TEE
,46,+kmod-ipt-compat-xtables
))
107 $(eval
$(call BuildTemplate
,ipp2p
,IPP2P
,xt_ipp2p
,xt_ipp2p
,46,))
108 $(eval
$(call BuildTemplate
,rawpost
,RAWPOST
,,iptable_rawpost
,46,+kmod-ipt-compat-xtables
))
109 $(eval
$(call BuildTemplate
,rawnat
,RAWNAT
,xt_RAWDNAT xt_RAWSNAT
,xt_RAWNAT
,46,+kmod-ipt-compat-xtables
))