X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c2c345c26f1814fb6bf84b8b017a5ab4c224c7d4..80c7b4465b24b96dfb9c6eb48f124ce7fec01823:/package/iptables/Makefile diff --git a/package/iptables/Makefile b/package/iptables/Makefile index 1286062ce..026df266b 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=iptables PKG_VERSION:=1.4.10 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_MD5SUM:=f382fe693f0b59d87bd47bea65eca198 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -23,6 +23,10 @@ PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +ifneq ($(CONFIG_EXTERNAL_KERNEL_TREE),"") +PATCH_DIR:= +endif + include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) -include $(LINUX_DIR)/.config @@ -75,26 +79,6 @@ IPv4 firewall administration tool. endef -define Package/iptables-mod-conntrack -$(call Package/iptables/Module, +kmod-ipt-conntrack) - TITLE:=Basic connection tracking extensions -endef - -define Package/iptables-mod-conntrack/description -Basic iptables extensions for connection tracking. - - Matches: - - state - - conntrack - - Targets: - - NOTRACK - - Tables: - - raw - -endef - define Package/iptables-mod-conntrack-extra $(call Package/iptables/Module, +kmod-ipt-conntrack-extra) TITLE:=Extra connection tracking extensions @@ -139,7 +123,6 @@ iptables extensions for matching/changing IP packet options. Matches: - dscp - - hashlimit - ecn - length - mark @@ -189,24 +172,6 @@ IPset iptables extensions. endef -define Package/iptables-mod-nat -$(call Package/iptables/Module, +kmod-ipt-nat) - TITLE:=Basic NAT extensions -endef - -define Package/iptables-mod-nat/description -iptables extensions for basic NAT targets. - - Targets: - - SNAT - - DNAT - - MASQUERADE - - Tables: - - nat - -endef - define Package/iptables-mod-nat-extra $(call Package/iptables/Module, +kmod-ipt-nat-extra) TITLE:=Extra NAT extensions @@ -332,11 +297,6 @@ U32 iptables extensions. endef -define Package/iptables-utils -$(call Package/iptables/Module, ) - TITLE:=iptables save and restore utilities -endef - define Package/ip6tables $(call Package/iptables/Default) DEPENDS:=+kmod-ip6tables +libip6tc +libxtables @@ -345,13 +305,6 @@ $(call Package/iptables/Default) MENU:=1 endef -define Package/ip6tables-utils -$(call Package/iptables/Default) - DEPENDS:=ip6tables - CATEGORY:=IPv6 - TITLE:=ip6tables save and restore utilities -endef - define Package/libiptc $(call Package/iptables/Default) SECTION:=libs @@ -400,17 +353,18 @@ TARGET_CFLAGS += \ CONFIGURE_ARGS += \ --enable-shared \ --enable-devel \ - --enable-ipv6 \ + $(if $(CONFIG_IPV6),--enable-ipv6,--disable-ipv6) \ --enable-libipq \ --with-kernel="$(LINUX_DIR)" \ - --with-xtlibdir=/usr/lib/iptables + --with-xtlibdir=/usr/lib/iptables \ + --enable-static MAKE_FLAGS := \ $(TARGET_CONFIGURE_OPTS) \ COPT_FLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="-rdynamic" \ KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \ KBUILD_OUTPUT="$(LINUX_DIR)" \ + BUILTIN_MODULES="$(patsubst ipt_%,%,$(patsubst xt_%,%,$(IPT_BUILTIN) $(IPT_CONNTRACK-m) $(IPT_NAT-m)))" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include @@ -438,39 +392,22 @@ endef define Package/iptables/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(1)/usr/sbin/ + $(LN) iptables $(1)/usr/sbin/iptables-save + $(LN) iptables $(1)/usr/sbin/iptables-restore $(INSTALL_DIR) $(1)/usr/lib/iptables - (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ - for m in $(patsubst xt_%,ipt_%,$(IPT_BUILTIN)) $(patsubst ipt_%,xt_%,$(IPT_BUILTIN)); do \ - if [ -f $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so ]; then \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so $(1)/usr/lib/iptables/ ;\ - fi; \ - done \ - ) -endef - -define Package/iptables-utils/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/iptables-multi $(1)/usr/sbin/ - $(LN) iptables-multi $(1)/usr/sbin/iptables-save - $(LN) iptables-multi $(1)/usr/sbin/iptables-restore endef define Package/ip6tables/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(1)/usr/sbin/ + $(LN) ip6tables $(1)/usr/sbin/ip6tables-save + $(LN) ip6tables $(1)/usr/sbin/ip6tables-restore $(INSTALL_DIR) $(1)/usr/lib/iptables (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ $(CP) libip6t_*.so $(1)/usr/lib/iptables/ \ ) endef -define Package/ip6tables-utils/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables-multi $(1)/usr/sbin/ - $(LN) ip6tables-multi $(1)/usr/sbin/ip6tables-save - $(LN) ip6tables-multi $(1)/usr/sbin/ip6tables-restore -endef - define Package/libiptc/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiptc.so* $(1)/usr/lib/ @@ -516,15 +453,12 @@ L7_INSTALL:=\ $(eval $(call BuildPackage,iptables)) -$(eval $(call BuildPackage,iptables-utils)) -$(eval $(call BuildPlugin,iptables-mod-conntrack,$(IPT_CONNTRACK-m))) $(eval $(call BuildPlugin,iptables-mod-conntrack-extra,$(IPT_CONNTRACK_EXTRA-m))) $(eval $(call BuildPlugin,iptables-mod-extra,$(IPT_EXTRA-m))) $(eval $(call BuildPlugin,iptables-mod-filter,$(IPT_FILTER-m),$(L7_INSTALL))) $(eval $(call BuildPlugin,iptables-mod-ipopt,$(IPT_IPOPT-m))) $(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m))) $(eval $(call BuildPlugin,iptables-mod-ipset,ipt_set ipt_SET)) -$(eval $(call BuildPlugin,iptables-mod-nat,$(IPT_NAT-m))) $(eval $(call BuildPlugin,iptables-mod-nat-extra,$(IPT_NAT_EXTRA-m))) $(eval $(call BuildPlugin,iptables-mod-iprange,$(IPT_IPRANGE-m))) $(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m))) @@ -534,7 +468,6 @@ $(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m))) $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m))) $(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m))) $(eval $(call BuildPackage,ip6tables)) -$(eval $(call BuildPackage,ip6tables-utils)) $(eval $(call BuildPackage,libiptc)) $(eval $(call BuildPackage,libip4tc)) $(eval $(call BuildPackage,libip6tc))