3 include $(TOPDIR
)/rules.mk
4 include kernelconfig.mk
9 PKG_MD5SUM
:=c3358a3bd0d7755df0b64a5063db296b
11 PKG_SOURCE_URL
:=http
://www.netfilter.org
/files
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
18 include $(TOPDIR
)/package
/rules.mk
20 $(eval
$(call PKG_template
,IPTABLES
,iptables
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
21 $(eval
$(call PKG_template
,IPTABLES_EXTRA
,iptables-extra
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
22 $(eval
$(call PKG_template
,IPTABLES_UTILS
,iptables-utils
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
23 $(eval
$(call PKG_template
,IP6TABLES
,ip6tables
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
25 $(PKG_BUILD_DIR
)/.built
:
26 chmod a
+x
$(PKG_BUILD_DIR
)/extensions
/.
*-test
27 mkdir
-p
$(PKG_INSTALL_DIR
)
28 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
29 $(TARGET_CONFIGURE_OPTS
) \
30 CC
=$(TARGET_CC
) COPT_FLAGS
="$(TARGET_CFLAGS)" \
31 KERNEL_DIR
=$(LINUX_DIR
) PREFIX
=/usr \
32 DESTDIR
="$(PKG_INSTALL_DIR)" \
33 all install install-devel
34 touch
$(PKG_BUILD_DIR
)/.built
37 install -d
-m0755
$(IDIR_IPTABLES
)/usr
/sbin
38 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/iptables
$(IDIR_IPTABLES
)/usr
/sbin
/
39 install -d
-m0755
$(IDIR_IPTABLES
)/usr
/lib
/iptables
40 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
41 cp
-fpR
$(patsubst %,libipt_
%.so
,$(ext-y
)) $(IDIR_IPTABLES
)/usr
/lib
/iptables \
43 $(RSTRIP
) $(IDIR_IPTABLES
)
44 $(IPKG_BUILD
) $(IDIR_IPTABLES
) $(PACKAGE_DIR
)
46 $(IPKG_IPTABLES_EXTRA
):
47 install -d
-m0755
$(IDIR_IPTABLES_EXTRA
)/usr
/lib
/iptables
48 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
49 cp
-fpR
$(patsubst %,libipt_
%.so
,$(ext-m
)) $(IDIR_IPTABLES_EXTRA
)/usr
/lib
/iptables \
51 $(RSTRIP
) $(IDIR_IPTABLES_EXTRA
)
52 $(IPKG_BUILD
) $(IDIR_IPTABLES_EXTRA
) $(PACKAGE_DIR
)
54 $(IPKG_IPTABLES_UTILS
):
55 install -d
-m0755
$(IDIR_IPTABLES_UTILS
)/usr
/sbin
56 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/iptables-
{save
,restore
} $(IDIR_IPTABLES_UTILS
)/usr
/sbin
57 $(RSTRIP
) $(IDIR_IPTABLES_UTILS
)
58 $(IPKG_BUILD
) $(IDIR_IPTABLES_UTILS
) $(PACKAGE_DIR
)
61 install -d
-m0755
$(IDIR_IP6TABLES
)/usr
/sbin
62 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/ip6tables
$(IDIR_IP6TABLES
)/usr
/sbin
/
63 install -d
-m0755
$(IDIR_IP6TABLES
)/usr
/lib
/iptables
64 (cd
$(PKG_INSTALL_DIR
)/usr
/lib
/iptables
; \
65 cp
-fpR libip6t_
*.so
$(IDIR_IP6TABLES
)/usr
/lib
/iptables \
67 $(RSTRIP
) $(IDIR_IP6TABLES
)
68 $(IPKG_BUILD
) $(IDIR_IP6TABLES
) $(PACKAGE_DIR
)
70 $(STAGING_DIR
)/usr
/lib
/libipq.a
: $(PKG_BUILD_DIR
)/.built
71 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/libipq.h
$(STAGING_DIR
)/usr
/include/
72 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libipq.a
$(STAGING_DIR
)/usr
/lib
/
74 install-dev
: $(STAGING_DIR
)/usr
/lib
/libipq.a
77 rm -rf
$(STAGING_DIR
)/usr
/include/libipq.h
78 rm -rf
$(STAGING_DIR
)/usr
/lib
/libipq.a