2 # Copyright (C) 2009-2013 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
14 PKG_MD5SUM
:=335663ece5fb17c7d0bb24dbdc697eb1
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
17 PKG_SOURCE_URL
:=@SF
/xtables-addons
18 PKG_BUILD_DEPENDS
:=iptables
21 PKG_CHECK_FORMAT_SECURITY
:=0
23 PKG_MAINTAINER
:=Jo-Philipp Wich
<jow@openwrt.org
>
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/xtables-addons
35 TITLE
:=Extensions not distributed in the main Xtables
36 URL
:=http
://xtables-addons.sourceforge.net
/
42 --with-kbuild
="$(LINUX_DIR)" \
43 --with-xtables
="$(STAGING_DIR)/usr" \
44 --with-xtlibdir
="/usr/lib/iptables" \
47 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
48 ARCH
="$(LINUX_KARCH)" \
49 CROSS_COMPILE
="$(TARGET_CROSS)" \
50 DESTDIR
="$(PKG_INSTALL_DIR)" \
56 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
57 ARCH
="$(LINUX_KARCH)" \
58 CROSS_COMPILE
="$(TARGET_CROSS)" \
59 DESTDIR
="$(PKG_INSTALL_DIR)" \
64 # 1: extension/module suffix used in package name
65 # 2: extension/module display name used in package title/description
66 # 3: list of extensions to package
67 # 4: list of modules to package
68 # 5: module load priority
73 define Package
/iptables-mod-
$(1)
74 $$(call Package
/xtables-addons
)
76 TITLE
:=$(2) iptables extension
77 DEPENDS
:=iptables
$(if
$(4),+kmod-ipt-
$(1))
80 define Package
/iptables-mod-
$(1)/install
81 $(INSTALL_DIR
) $$(1)/usr
/lib
/iptables
84 $(PKG_INSTALL_DIR
)/usr
/lib
/iptables
/lib
$$$$$$$${m}.so \
85 $$(1)/usr
/lib
/iptables
/ ; \
89 $$(eval
$$(call BuildPackage
,iptables-mod-
$(1)))
93 define KernelPackage
/ipt-
$(1)
94 SUBMENU
:=Netfilter Extensions
95 TITLE
:=$(2) netfilter module
96 DEPENDS
:=+kmod-ipt-core
$(5)
98 FILES
:=$(foreach mod
,$(4),$(PKG_BUILD_DIR
)/extensions
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
99 AUTOLOAD
:=$(call AutoProbe
,$(notdir $(4)))
102 $$(eval
$$(call KernelPackage
,ipt-
$(1)))
108 define Package
/iptaccount
109 $(call Package
/xtables-addons
)
111 TITLE
:=iptables-mod-account control utility
112 DEPENDS
:=iptables
+iptables-mod-account
115 define Package
/iptaccount
/install
116 $(INSTALL_DIR
) $(1)/usr
/lib
117 $(INSTALL_DIR
) $(1)/usr
/sbin
119 $(PKG_INSTALL_DIR
)/usr
/lib
/libxt_ACCOUNT_cl.so
* \
122 $(PKG_INSTALL_DIR
)/usr
/sbin
/iptaccount \
127 #$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS))
129 $(eval
$(call BuildTemplate
,compat-xtables
,API compatibilty layer
,,compat_xtables
,+IPV6
:kmod-ip6tables
,CONFIG_NF_CONNTRACK_MARK
=y
))
130 $(eval
$(call BuildTemplate
,nathelper-rtsp
,RTSP Conntrack and NAT
,,rtsp
/nf_conntrack_rtsp rtsp
/nf_nat_rtsp
,+kmod-ipt-conntrack-extra
+kmod-ipt-nat
))
132 $(eval
$(call BuildTemplate
,account
,ACCOUNT
,xt_ACCOUNT
,ACCOUNT
/xt_ACCOUNT
,+kmod-ipt-compat-xtables
))
133 $(eval
$(call BuildTemplate
,chaos
,CHAOS
,xt_CHAOS
,xt_CHAOS
,+kmod-ipt-compat-xtables
+kmod-ipt-delude
+kmod-ipt-tarpit
))
134 $(eval
$(call BuildTemplate
,condition
,Condition
,xt_condition
,xt_condition
,))
135 $(eval
$(call BuildTemplate
,delude
,DELUDE
,xt_DELUDE
,xt_DELUDE
,+kmod-ipt-compat-xtables
))
136 $(eval
$(call BuildTemplate
,dhcpmac
,DHCPMAC
,xt_DHCPMAC
,xt_DHCPMAC
,+kmod-ipt-compat-xtables
))
137 $(eval
$(call BuildTemplate
,dnetmap
,DNETMAP
,xt_DNETMAP
,xt_DNETMAP
,+kmod-ipt-compat-xtables
+kmod-ipt-nat
))
138 $(eval
$(call BuildTemplate
,fuzzy
,fuzzy
,xt_fuzzy
,xt_fuzzy
,))
139 $(eval
$(call BuildTemplate
,geoip
,geoip
,xt_geoip
,xt_geoip
,))
140 $(eval
$(call BuildTemplate
,iface
,iface
,xt_iface
,xt_iface
,))
141 $(eval
$(call BuildTemplate
,ipmark
,IPMARK
,xt_IPMARK
,xt_IPMARK
,+kmod-ipt-compat-xtables
))
142 $(eval
$(call BuildTemplate
,ipp2p
,IPP2P
,xt_ipp2p
,xt_ipp2p
,+kmod-ipt-compat-xtables
))
143 $(eval
$(call BuildTemplate
,ipv4options
,ipv4options
,xt_ipv4options
,xt_ipv4options
,))
144 $(eval
$(call BuildTemplate
,length2
,length2
,xt_length2
,xt_length2
,+kmod-ipt-compat-xtables
))
145 $(eval
$(call BuildTemplate
,logmark
,LOGMARK
,xt_LOGMARK
,xt_LOGMARK
,+kmod-ipt-compat-xtables
))
146 $(eval
$(call BuildTemplate
,lscan
,lscan
,xt_lscan
,xt_lscan
,))
147 $(eval
$(call BuildTemplate
,lua
,Lua PacketScript
,xt_LUA
,LUA
/xt_LUA
,+kmod-ipt-conntrack-extra
))
148 $(eval
$(call BuildTemplate
,psd
,psd
,xt_psd
,xt_psd
,))
149 $(eval
$(call BuildTemplate
,quota2
,quota2
,xt_quota2
,xt_quota2
,))
150 $(eval
$(call BuildTemplate
,sysrq
,SYSRQ
,xt_SYSRQ
,xt_SYSRQ
,+kmod-ipt-compat-xtables
))
151 $(eval
$(call BuildTemplate
,tarpit
,TARPIT
,xt_TARPIT
,xt_TARPIT
,+kmod-ipt-compat-xtables
+IPV6
:kmod-ipv6
))
153 $(eval
$(call BuildPackage
,iptaccount
))