source: freewrt/package/iptables/Makefile@ b917538

freewrt_1_0 freewrt_2_0
Last change on this file since b917538 was b917538, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago
  • sync with changes in trunk
  • lzo2 instead of lzo
  • fix tinc/vtun build
  • security update for openssh/openssl
  • update for iproute2,openvpn,openntpd, iptables and ipp, openswan
  • disable ipv6 in busybox, autoselect this feature for all ipv6 related packages
  • add better startup scripts for openssh and openntpd

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@800 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 4.9 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:= iptables
10PKG_VERSION:= 1.3.6
11PKG_RELEASE:= 1
12PKG_MD5SUM:= 077e886a9c90a11bb47f3d7a4fc4a689
13PKG_INIT:= 45
14
15PKG_SOURCE_URL:= http://www.netfilter.org/projects/iptables/files \
16 ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \
17 ftp://ftp.de.netfilter.org/pub/netfilter/iptables/ \
18 ftp://ftp.no.netfilter.org/pub/netfilter/iptables/
19PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
20
21
22define IPKG_plugin_template
23
24$$(IPKG_$(1)):
25 install -m0755 -d $$(IDIR_$(1))/usr/lib/iptables
26 for m in $$(patsubst xt_%,ipt_%,$(2)); do \
27 $(INSTALL_DATA) $(WRKINST)/usr/lib/iptables/lib$$$${m}.so $$(IDIR_$(1))/usr/lib/iptables/ ; \
28 done
29 @[ -z "$(3)" ] || $(MAKE) $(3)
30 $(RSTRIP) $$(IDIR_$(1))
31 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
32
33endef
34
35include $(TOPDIR)/mk/package.mk
36include $(LINUX_DIR)/.config
37include $(TOPDIR)/mk/netfilter.mk
38
39$(eval $(call PKG_template,IPTABLES,iptables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
40$(eval $(call PKG_template,IPTABLES_EXTRA,iptables-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
41$(eval $(call PKG_template,IPTABLES_UTILS,iptables-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
42$(eval $(call PKG_template,IP6TABLES,ip6tables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
43
44$(eval $(call PKG_template,IPTABLES_MOD_CONNTRACK,iptables-mod-conntrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
45$(eval $(call PKG_template,IPTABLES_MOD_EXTRA,iptables-mod-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
46$(eval $(call PKG_template,IPTABLES_MOD_FILTER,iptables-mod-filter,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
47$(eval $(call PKG_template,IPTABLES_MOD_IMQ,iptables-mod-imq,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
48$(eval $(call PKG_template,IPTABLES_MOD_IPOPT,iptables-mod-ipopt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
49$(eval $(call PKG_template,IPTABLES_MOD_IPSEC,iptables-mod-ipsec,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
50$(eval $(call PKG_template,IPTABLES_MOD_NAT,iptables-mod-nat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
51$(eval $(call PKG_template,IPTABLES_MOD_ULOG,iptables-mod-ulog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
52
53$(eval $(call IPKG_plugin_template,IPTABLES_MOD_CONNTRACK,$(IPT_CONNTRACK-m)))
54$(eval $(call IPKG_plugin_template,IPTABLES_MOD_EXTRA,$(IPT_EXTRA-m)))
55$(eval $(call IPKG_plugin_template,IPTABLES_MOD_FILTER,$(IPT_FILTER-m),layer7-install))
56$(eval $(call IPKG_plugin_template,IPTABLES_MOD_IMQ,$(IPT_IMQ-m)))
57$(eval $(call IPKG_plugin_template,IPTABLES_MOD_IPOPT,$(IPT_IPOPT-m)))
58$(eval $(call IPKG_plugin_template,IPTABLES_MOD_IPSEC,$(IPT_IPSEC-m)))
59$(eval $(call IPKG_plugin_template,IPTABLES_MOD_NAT,$(IPT_NAT-m)))
60$(eval $(call IPKG_plugin_template,IPTABLES_MOD_ULOG,$(IPT_ULOG-m)))
61
62$(WRKBUILD)/.configured:
63 touch $@
64
65$(WRKBUILD)/.built:
66 chmod a+x $(WRKBUILD)/extensions/.*-test*
67 $(MAKE) -C $(WRKBUILD) \
68 $(TARGET_CONFIGURE_OPTS) \
69 CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \
70 KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \
71 DESTDIR="$(WRKINST)" \
72 all install install-devel
73 touch $@
74
75$(IPKG_IPTABLES):
76 $(INSTALL_DIR) $(IDIR_IPTABLES)/etc/init.d
77 $(INSTALL_DIR) $(IDIR_IPTABLES)/usr/sbin
78 $(INSTALL_DIR) $(IDIR_IPTABLES)/usr/lib/iptables
79 $(INSTALL_BIN) ./files/firewall.init $(IDIR_IPTABLES)/etc/init.d/S$(PKG_INIT)firewall
80 $(INSTALL_BIN) $(WRKINST)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/
81 (cd $(WRKINST)/usr/lib/iptables ; \
82 $(INSTALL_DATA) $(patsubst %,lib%.so,$(IPT_BUILTIN:xt_%=ipt_%)) $(IDIR_IPTABLES)/usr/lib/iptables/ \
83 )
84 $(RSTRIP) $(IDIR_IPTABLES)
85 $(IPKG_BUILD) $(IDIR_IPTABLES) $(PACKAGE_DIR)
86
87$(IPKG_IPTABLES_EXTRA):
88 $(IPKG_BUILD) $(IDIR_IPTABLES_EXTRA) $(PACKAGE_DIR)
89
90$(IPKG_IPTABLES_UTILS):
91 $(INSTALL_DIR) $(IDIR_IPTABLES_UTILS)/usr/sbin
92 $(INSTALL_BIN) $(WRKINST)/usr/sbin/iptables-{save,restore} $(IDIR_IPTABLES_UTILS)/usr/sbin/
93 $(RSTRIP) $(IDIR_IPTABLES_UTILS)
94 $(IPKG_BUILD) $(IDIR_IPTABLES_UTILS) $(PACKAGE_DIR)
95
96$(IPKG_IP6TABLES):
97 $(INSTALL_DIR) $(IDIR_IP6TABLES)/usr/sbin
98 $(INSTALL_DIR) $(IDIR_IP6TABLES)/usr/lib/iptables
99 $(INSTALL_BIN) $(WRKINST)/usr/sbin/ip6tables $(IDIR_IP6TABLES)/usr/sbin/
100 (cd $(WRKINST)/usr/lib/iptables ; \
101 $(INSTALL_DATA) libip6t_*.so $(IDIR_IP6TABLES)/usr/lib/iptables/ \
102 )
103 $(RSTRIP) $(IDIR_IP6TABLES)
104 $(IPKG_BUILD) $(IDIR_IP6TABLES) $(PACKAGE_DIR)
105
106$(STAGING_DIR)/usr/lib/libipq.a: $(WRKBUILD)/.built
107 $(MAKE) -C $(WRKBUILD) \
108 $(TARGET_CONFIGURE_OPTS) \
109 CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \
110 KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \
111 DESTDIR="$(STAGING_DIR)" \
112 install install-devel
113
114layer7-install:
115 $(INSTALL_DIR) $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols
116 $(INSTALL_DATA) files/l7/*.pat $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols/
117
118install-dev: $(STAGING_DIR)/usr/lib/libipq.a
119
120uninstall-dev:
121 rm -rf $(STAGING_DIR)/usr/include/libipq.h
122 rm -rf $(STAGING_DIR)/usr/lib/libipq.a
123
124compile-targets: install-dev
125clean-targets: uninstall-dev
Note: See TracBrowser for help on using the repository browser.