3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=86d88455520cfdc56fd7ae27897a80a4
10 PKG_SOURCE_URL
:=http
://www.netfilter.org
/files \
11 ftp
://ftp.be.netfilter.org
/pub
/netfilter
/iptables
/ \
12 ftp
://ftp.de.netfilter.org
/pub
/netfilter
/iptables
/ \
13 ftp
://ftp.no.netfilter.org
/pub
/netfilter
/iptables
/
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
20 define IPKG_plugin_template
23 install -m0755
-d
$$(IDIR_
$(1))/usr
/lib
/iptables
25 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
/lib
$$$${m}.so
$$(IDIR_
$(1))/usr
/lib
/iptables
/ ; \
27 @
[ -z
"$(3)" ] ||
$(MAKE
) $(3)
28 $(RSTRIP
) $$(IDIR_
$(1))
29 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
33 include $(TOPDIR
)/package
/rules.mk
34 include $(LINUX_DIR
)/.config
35 include $(TOPDIR
)/target
/linux
/netfilter.mk
37 $(eval
$(call PKG_template
,IPTABLES
,iptables
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
38 $(eval
$(call PKG_template
,IPTABLES_EXTRA
,iptables-extra
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
39 $(eval
$(call PKG_template
,IPTABLES_UTILS
,iptables-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
40 $(eval
$(call PKG_template
,IP6TABLES
,ip6tables
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
42 $(eval
$(call PKG_template
,IPTABLES_MOD_CONNTRACK
,iptables-mod-conntrack
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
43 $(eval
$(call PKG_template
,IPTABLES_MOD_EXTRA
,iptables-mod-extra
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
44 $(eval
$(call PKG_template
,IPTABLES_MOD_FILTER
,iptables-mod-filter
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
45 $(eval
$(call PKG_template
,IPTABLES_MOD_IMQ
,iptables-mod-img
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
46 $(eval
$(call PKG_template
,IPTABLES_MOD_IPOPT
,iptables-mod-ipopt
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
47 $(eval
$(call PKG_template
,IPTABLES_MOD_IPSEC
,iptables-mod-ipsec
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
48 $(eval
$(call PKG_template
,IPTABLES_MOD_NAT
,iptables-mod-nat
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
49 $(eval
$(call PKG_template
,IPTABLES_MOD_ULOG
,iptables-mod-ulog
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
51 $(eval
$(call IPKG_plugin_template
,IPTABLES_MOD_CONNTRACK
,$(IPT_CONNTRACK-m
)))
52 $(eval
$(call IPKG_plugin_template
,IPTABLES_MOD_EXTRA
,$(IPT_EXTRA-m
)))
53 $(eval
$(call IPKG_plugin_template
,IPTABLES_MOD_FILTER
,$(IPT_FILTER-m
),layer7-install
))
54 $(eval
$(call IPKG_plugin_template
,IPTABLES_MOD_IMQ
,$(IPT_IMQ-m
)))
55 $(eval
$(call IPKG_plugin_template
,IPTABLES_MOD_IPOPT
,$(IPT_IPOPT-m
)))
56 $(eval
$(call IPKG_plugin_template
,IPTABLES_MOD_IPSEC
,$(IPT_IPSEC-m
)))
57 $(eval
$(call IPKG_plugin_template
,IPTABLES_MOD_NAT
,$(IPT_NAT-m
)))
58 $(eval
$(call IPKG_plugin_template
,IPTABLES_MOD_ULOG
,$(IPT_ULOG-m
)))
60 $(PKG_BUILD_DIR
)/.configured
:
63 $(PKG_BUILD_DIR
)/.built
:
64 chmod a
+x
$(PKG_BUILD_DIR
)/extensions
/.
*-test*
65 mkdir
-p
$(PKG_INSTALL_DIR
)
66 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
67 $(TARGET_CONFIGURE_OPTS
) \
68 CC
=$(TARGET_CC
) COPT_FLAGS
="$(TARGET_CFLAGS)" \
69 KERNEL_DIR
=$(LINUX_DIR
) PREFIX
=/usr \
70 DESTDIR
="$(PKG_INSTALL_DIR)" \
71 all install install-devel
75 install -d
-m0755
$(IDIR_IPTABLES
)/usr
/sbin
76 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/iptables
$(IDIR_IPTABLES
)/usr
/sbin
/
77 install -d
-m0755
$(IDIR_IPTABLES
)/usr
/lib
/iptables
78 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
79 cp
-fpR
$(patsubst %,lib
%.so
,$(IPT_BUILTIN
)) $(IDIR_IPTABLES
)/usr
/lib
/iptables
/ \
81 $(RSTRIP
) $(IDIR_IPTABLES
)
82 $(IPKG_BUILD
) $(IDIR_IPTABLES
) $(PACKAGE_DIR
)
84 $(IPKG_IPTABLES_UTILS
):
85 install -d
-m0755
$(IDIR_IPTABLES_UTILS
)/usr
/sbin
86 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/iptables-
{save
,restore
} $(IDIR_IPTABLES_UTILS
)/usr
/sbin
/
87 $(RSTRIP
) $(IDIR_IPTABLES_UTILS
)
88 $(IPKG_BUILD
) $(IDIR_IPTABLES_UTILS
) $(PACKAGE_DIR
)
91 install -d
-m0755
$(IDIR_IP6TABLES
)/usr
/sbin
92 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/ip6tables
$(IDIR_IP6TABLES
)/usr
/sbin
/
93 install -d
-m0755
$(IDIR_IP6TABLES
)/usr
/lib
/iptables
94 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
95 cp
-fpR libip6t_
*.so
$(IDIR_IP6TABLES
)/usr
/lib
/iptables
/ \
97 $(RSTRIP
) $(IDIR_IP6TABLES
)
98 $(IPKG_BUILD
) $(IDIR_IP6TABLES
) $(PACKAGE_DIR
)
100 $(STAGING_DIR
)/usr
/lib
/libipq.a
: $(PKG_BUILD_DIR
)/.built
101 mkdir
-p
$(STAGING_DIR
)/usr
/include
102 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/libipq.h
$(STAGING_DIR
)/usr
/include/
103 mkdir
-p
$(STAGING_DIR
)/usr
/lib
104 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libipq.a
$(STAGING_DIR
)/usr
/lib
/
107 mkdir
-p
$(IDIR_IPTABLES_MOD_FILTER
)/etc
/l7-protocols
108 cp files
/l7
/*.pat
$(IDIR_IPTABLES_MOD_FILTER
)/etc
/l7-protocols
/
110 install-dev
: $(STAGING_DIR
)/usr
/lib
/libipq.a
113 rm -rf
$(STAGING_DIR
)/usr
/include/libipq.h
114 rm -rf
$(STAGING_DIR
)/usr
/lib
/libipq.a
116 compile-targets
: install-dev
117 clean-targets
: uninstall-dev