3 include $(TOPDIR
)/rules.mk
4 include kernelconfig.mk
9 PKG_MD5SUM
:=86d88455520cfdc56fd7ae27897a80a4
11 PKG_SOURCE_URL
:=http
://www.netfilter.org
/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_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
19 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
21 include $(TOPDIR
)/package
/rules.mk
23 $(eval
$(call PKG_template
,IPTABLES
,iptables
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
24 $(eval
$(call PKG_template
,IPTABLES_EXTRA
,iptables-extra
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
25 $(eval
$(call PKG_template
,IPTABLES_UTILS
,iptables-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
26 $(eval
$(call PKG_template
,IP6TABLES
,ip6tables
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
28 $(PKG_BUILD_DIR
)/.configured
:
31 $(PKG_BUILD_DIR
)/.built
:
32 chmod a
+x
$(PKG_BUILD_DIR
)/extensions
/.
*-test
33 mkdir
-p
$(PKG_INSTALL_DIR
)
34 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
35 $(TARGET_CONFIGURE_OPTS
) \
36 CC
=$(TARGET_CC
) COPT_FLAGS
="$(TARGET_CFLAGS)" \
37 KERNEL_DIR
=$(LINUX_DIR
) PREFIX
=/usr \
38 DESTDIR
="$(PKG_INSTALL_DIR)" \
39 all install install-devel
43 install -d
-m0755
$(IDIR_IPTABLES
)/usr
/sbin
44 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/iptables
$(IDIR_IPTABLES
)/usr
/sbin
/
45 install -d
-m0755
$(IDIR_IPTABLES
)/usr
/lib
/iptables
46 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
47 cp
-fpR
$(patsubst %,libipt_
%.so
,$(ext-y
)) $(IDIR_IPTABLES
)/usr
/lib
/iptables \
49 $(RSTRIP
) $(IDIR_IPTABLES
)
50 $(IPKG_BUILD
) $(IDIR_IPTABLES
) $(PACKAGE_DIR
)
52 $(IPKG_IPTABLES_EXTRA
):
53 install -d
-m0755
$(IDIR_IPTABLES_EXTRA
)/usr
/lib
/iptables
54 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
55 cp
-fpR
$(patsubst %,libipt_
%.so
,$(ext-m
)) $(IDIR_IPTABLES_EXTRA
)/usr
/lib
/iptables \
57 $(RSTRIP
) $(IDIR_IPTABLES_EXTRA
)
58 $(IPKG_BUILD
) $(IDIR_IPTABLES_EXTRA
) $(PACKAGE_DIR
)
60 $(IPKG_IPTABLES_UTILS
):
61 install -d
-m0755
$(IDIR_IPTABLES_UTILS
)/usr
/sbin
62 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/iptables-
{save
,restore
} $(IDIR_IPTABLES_UTILS
)/usr
/sbin
63 $(RSTRIP
) $(IDIR_IPTABLES_UTILS
)
64 $(IPKG_BUILD
) $(IDIR_IPTABLES_UTILS
) $(PACKAGE_DIR
)
67 install -d
-m0755
$(IDIR_IP6TABLES
)/usr
/sbin
68 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/ip6tables
$(IDIR_IP6TABLES
)/usr
/sbin
/
69 install -d
-m0755
$(IDIR_IP6TABLES
)/usr
/lib
/iptables
70 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
71 cp
-fpR libip6t_
*.so
$(IDIR_IP6TABLES
)/usr
/lib
/iptables \
73 $(RSTRIP
) $(IDIR_IP6TABLES
)
74 $(IPKG_BUILD
) $(IDIR_IP6TABLES
) $(PACKAGE_DIR
)
76 $(STAGING_DIR
)/usr
/lib
/libipq.a
: $(PKG_BUILD_DIR
)/.built
77 mkdir
-p
$(STAGING_DIR
)/usr
/include/ $(STAGING_DIR
)/usr
/lib
/
78 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/libipq.h
$(STAGING_DIR
)/usr
/include/
79 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libipq.a
$(STAGING_DIR
)/usr
/lib
/
81 install-dev
: $(STAGING_DIR
)/usr
/lib
/libipq.a
84 rm -rf
$(STAGING_DIR
)/usr
/include/libipq.h
85 rm -rf
$(STAGING_DIR
)/usr
/lib
/libipq.a