3 include $(TOPDIR
)/rules.mk
9 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
10 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
11 PKG_SOURCE_URL
:=http
://www.netfilter.org
/projects
/iptables
/files \
12 ftp
://ftp.be.netfilter.org
/pub
/netfilter
/iptables
/ \
13 ftp
://ftp.de.netfilter.org
/pub
/netfilter
/iptables
/ \
14 ftp
://ftp.no.netfilter.org
/pub
/netfilter
/iptables
/
15 PKG_MD5SUM
:=00fb916fa8040ca992a5ace56d905ea5
18 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
20 PKG_MENU
:=IPv4
/ IPv6 firewall administration
22 include $(TOPDIR
)/package
/rules.mk
24 include $(LINUX_DIR
)/.config
25 include $(TOPDIR
)/target
/linux
/netfilter.mk
28 define Package
/iptables
33 TITLE
:=IPv4 firewall administration tool
34 URL
:=http
://netfilter.org
/
37 define Package
/iptables-mod-conntrack
41 TITLE
:=connection tracking modules
42 DESCRIPTION
:=iptables extensions for connection tracking
\\\
44 * libipt_conntrack
\\\
46 * libipt_connmark
/CONNMARK
50 define Package
/iptables-mod-filter
55 DESCRIPTION
:=iptables extensions for packet content inspection
\\\
62 define Package
/iptables-mod-imq
67 DESCRIPTION
:=iptables extension for IMQ support
\\\
73 define Package
/iptables-mod-ipopt
77 TITLE
:=IP
/Packet option modules
78 DESCRIPTION
:=iptables extensions for matching
/changing IP packet options
\\\
80 * libipt_dscp
/DSCP
\\\
91 define Package
/iptables-mod-ipsec
95 TITLE
:=IPSec extensions
96 DESCRIPTION
:=iptables extensions for matching ipsec traffic
\\\
103 define Package
/iptables-mod-nat
105 CATEGORY
:=Base system
107 TITLE
:=extra NAT targets
108 DESCRIPTION
:=iptables extensions for different NAT targets
\\\
113 define Package
/iptables-mod-ulog
115 CATEGORY
:=Base system
117 TITLE
:=user-space packet logging
118 DESCRIPTION
:=iptables extensions for user-space packet logging
\\\
123 define Package
/iptables-mod-extra
125 CATEGORY
:=Base system
127 TITLE
:=other extra iptables extensions
128 DESCRIPTION
:=other extra iptables extensions
\\\
138 define Package
/iptables-utils
140 CATEGORY
:=Base system
142 TITLE
:=iptables save and restore utilities
145 define Package
/ip6tables
147 CATEGORY
:=Base system
148 TITLE
:=IPv6 firewall administration tool
152 define Build
/Configure
156 chmod a
+x
$(PKG_BUILD_DIR
)/extensions
/.
*-test*
157 mkdir
-p
$(PKG_INSTALL_DIR
)
158 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
159 $(TARGET_CONFIGURE_OPTS
) \
160 CC
=$(TARGET_CC
) COPT_FLAGS
="$(TARGET_CFLAGS)" \
161 KERNEL_DIR
=$(LINUX_DIR
) PREFIX
=/usr \
162 DESTDIR
="$(PKG_INSTALL_DIR)" \
163 all install install-devel
167 define Build
/InstallDev
168 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
169 $(TARGET_CONFIGURE_OPTS
) \
170 CC
=$(TARGET_CC
) COPT_FLAGS
="$(TARGET_CFLAGS)" \
171 KERNEL_DIR
=$(LINUX_DIR
) PREFIX
=/usr \
172 DESTDIR
="$(STAGING_DIR)" \
173 install install-devel
176 define Build
/UninstallDev
177 rm -rf
$(STAGING_DIR
)/usr
/include/libipq.h
178 rm -rf
$(STAGING_DIR
)/usr
/lib
/libipq.a
182 define Package
/iptables
/install
183 install -d
-m0755
$(1)/etc
/config
184 install -m0644 .
/files
/firewall.config
$(1)/etc
/config
/firewall
185 install -d
-m0755
$(1)/etc
/init.d
186 install -m0755 .
/files
/firewall.init
$(1)/etc
/init.d
/S45firewall
187 install -m0755 .
/files
/firewall.user
$(1)/etc
/
188 install -d
-m0755
$(1)/usr
/lib
189 install -m0644 .
/files
/firewall.awk
$(1)/usr
/lib
190 install -d
-m0755
$(1)/usr
/sbin
191 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/iptables
$(1)/usr
/sbin
/
192 install -d
-m0755
$(1)/usr
/lib
/iptables
193 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
194 $(CP
) $(patsubst %,lib
%.so
,$(IPT_BUILTIN
:xt_
%=ipt_
%)) $(1)/usr
/lib
/iptables
/ \
199 define Package
/iptables-utils
/install
200 install -d
-m0755
$(1)/usr
/sbin
201 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/iptables-
{save
,restore
} $(1)/usr
/sbin
/
205 define Package
/ip6tables
/install
206 install -d
-m0755
$(1)/usr
/sbin
207 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ip6tables
$(1)/usr
/sbin
/
208 install -d
-m0755
$(1)/usr
/lib
/iptables
209 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
210 $(CP
) libip6t_
*.so
$(1)/usr
/lib
/iptables
/ \
216 define Package
/$(1)/install
217 install -m0755
-d
$$(1)/usr
/lib
/iptables
218 for m in
$$(patsubst xt_
%,ipt_
%,$(2)); do \
219 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/iptables
/lib
$$$$$$$${m}.so
$$(1)/usr
/lib
/iptables
/ ; \
225 $$(eval
$$(call BuildPackage
,$(1)))
228 L7_INSTALL
:=mkdir
-p
$$(1)/etc
/l7-protocols
; \
229 $(CP
) files
/l7
/*.pat
$$(1)/etc
/l7-protocols
/
231 $(eval
$(call BuildPackage
,iptables
))
232 $(eval
$(call BuildPackage
,iptables-utils
))
233 $(eval
$(call BuildPlugin
,iptables-mod-conntrack
,$(IPT_CONNTRACK-m
)))
234 $(eval
$(call BuildPlugin
,iptables-mod-extra
,$(IPT_EXTRA-m
)))
235 $(eval
$(call BuildPlugin
,iptables-mod-filter
,$(IPT_FILTER-m
),$(L7_INSTALL
)))
236 $(eval
$(call BuildPlugin
,iptables-mod-imq
,$(IPT_IMQ-m
)))
237 $(eval
$(call BuildPlugin
,iptables-mod-ipopt
,$(IPT_IPOPT-m
)))
238 $(eval
$(call BuildPlugin
,iptables-mod-ipsec
,$(IPT_IPSEC-m
)))
239 $(eval
$(call BuildPlugin
,iptables-mod-nat
,$(IPT_NAT-m
)))
240 $(eval
$(call BuildPlugin
,iptables-mod-ulog
,$(IPT_ULOG-m
)))
241 $(eval
$(call BuildPackage
,ip6tables
))