2009-01-31 16:37:59 +00:00
|
|
|
#
|
2011-11-27 18:50:23 +00:00
|
|
|
# Copyright (C) 2009-2011 OpenWrt.org
|
2009-01-31 16:37:59 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=xtables-addons
|
2010-12-10 16:24:35 +00:00
|
|
|
PKG_VERSION:=1.31
|
2012-01-04 00:30:53 +00:00
|
|
|
PKG_RELEASE:=3
|
2009-01-31 16:37:59 +00:00
|
|
|
|
2010-12-10 16:24:35 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
|
|
PKG_MD5SUM:=97ac895a67df67c28def98763023d51b
|
2009-05-02 01:41:12 +00:00
|
|
|
PKG_SOURCE_URL:=@SF/xtables-addons
|
2009-01-31 16:37:59 +00:00
|
|
|
PKG_BUILD_DEPENDS:=iptables
|
2010-10-02 19:30:17 +00:00
|
|
|
PKG_INSTALL:=1
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
2009-01-31 16:37:59 +00:00
|
|
|
|
2010-12-10 16:24:35 +00:00
|
|
|
PKG_FIXUP:=libtool
|
|
|
|
|
2009-01-31 16:37:59 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/xtables-addons
|
|
|
|
SECTION:=net
|
2009-10-03 23:49:15 +00:00
|
|
|
CATEGORY:=Network
|
2011-03-12 01:57:34 +00:00
|
|
|
SUBMENU:=Firewall
|
2009-01-31 16:37:59 +00:00
|
|
|
TITLE:=Extensions not distributed in the main Xtables
|
2009-10-05 16:18:40 +00:00
|
|
|
URL:=http://xtables-addons.sourceforge.net/
|
2009-01-31 16:37:59 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
# uses GNU configure
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= \
|
|
|
|
--with-kbuild="$(LINUX_DIR)" \
|
|
|
|
--with-xtables="$(STAGING_DIR)/usr" \
|
|
|
|
--with-xtlibdir="/usr/lib/iptables" \
|
|
|
|
|
2009-02-28 15:53:39 +00:00
|
|
|
define Build/Compile
|
2010-10-02 19:30:17 +00:00
|
|
|
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
DEPMOD="/bin/true" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
all
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Install
|
2009-01-31 16:37:59 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2009-05-02 01:41:12 +00:00
|
|
|
DEPMOD="/bin/true" \
|
2010-01-24 20:41:44 +00:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2010-10-02 19:30:17 +00:00
|
|
|
install
|
2009-01-31 16:37:59 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
# 1: extension/module suffix used in package name
|
|
|
|
# 2: extension/module display name used in package title/description
|
2009-10-03 23:49:15 +00:00
|
|
|
# 3: list of extensions to package
|
|
|
|
# 4: list of modules to package
|
|
|
|
# 5: module load priority
|
|
|
|
# 6: module depends
|
2009-01-31 16:37:59 +00:00
|
|
|
define BuildTemplate
|
|
|
|
|
2009-10-03 23:49:15 +00:00
|
|
|
ifneq ($(3),)
|
2009-01-31 16:37:59 +00:00
|
|
|
define Package/iptables-mod-$(1)
|
|
|
|
$$(call Package/xtables-addons)
|
2009-12-14 11:02:58 +00:00
|
|
|
CATEGORY:=Network
|
2009-01-31 16:37:59 +00:00
|
|
|
TITLE:=$(2) iptables extension
|
2011-11-11 18:07:06 +00:00
|
|
|
DEPENDS:=iptables $(if $(4),+kmod-ipt-$(1))
|
2009-01-31 16:37:59 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/iptables-mod-$(1)/install
|
|
|
|
$(INSTALL_DIR) $$(1)/usr/lib/iptables
|
|
|
|
for m in $(3); do \
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so \
|
|
|
|
$$(1)/usr/lib/iptables/ ; \
|
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
|
|
|
$$(eval $$(call BuildPackage,iptables-mod-$(1)))
|
2009-10-03 23:49:15 +00:00
|
|
|
endif
|
2009-01-31 16:37:59 +00:00
|
|
|
|
2009-10-03 23:49:15 +00:00
|
|
|
ifneq ($(4),)
|
2009-01-31 16:37:59 +00:00
|
|
|
define KernelPackage/ipt-$(1)
|
|
|
|
SUBMENU:=Netfilter Extensions
|
|
|
|
TITLE:=$(2) netfilter module
|
2011-11-11 18:07:06 +00:00
|
|
|
DEPENDS:=kmod-ipt-core $(6)
|
2009-10-03 23:49:15 +00:00
|
|
|
FILES:=$(foreach mod,$(4),$(PKG_BUILD_DIR)/extensions/$(mod).$(LINUX_KMOD_SUFFIX))
|
|
|
|
AUTOLOAD:=$(call AutoLoad,$(5),$(notdir $(4)))
|
2009-01-31 16:37:59 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$$(eval $$(call KernelPackage,ipt-$(1)))
|
2009-10-03 23:49:15 +00:00
|
|
|
endif
|
2009-01-31 16:37:59 +00:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
2009-10-03 23:49:15 +00:00
|
|
|
#$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS))
|
|
|
|
$(eval $(call BuildTemplate,compat-xtables,API compatibilty layer,,compat_xtables,45,))
|
|
|
|
$(eval $(call BuildTemplate,chaos,CHAOS,xt_CHAOS,xt_CHAOS,47,+kmod-ipt-compat-xtables +kmod-ipt-delude +kmod-ipt-tarpit))
|
|
|
|
$(eval $(call BuildTemplate,condition,Condition,xt_condition,xt_condition,46,))
|
|
|
|
$(eval $(call BuildTemplate,delude,DELUDE,xt_DELUDE,xt_DELUDE,46,+kmod-ipt-compat-xtables))
|
|
|
|
$(eval $(call BuildTemplate,tarpit,TARPIT,xt_TARPIT,xt_TARPIT,46,+kmod-ipt-compat-xtables))
|
2010-12-10 21:15:47 +00:00
|
|
|
#$(eval $(call BuildTemplate,tee,TEE,xt_TEE,xt_TEE,46,+kmod-ipt-compat-xtables))
|
2009-10-03 23:49:15 +00:00
|
|
|
$(eval $(call BuildTemplate,ipp2p,IPP2P,xt_ipp2p,xt_ipp2p,46,))
|
2011-11-27 18:50:23 +00:00
|
|
|
$(eval $(call BuildTemplate,rawpost,RAWPOST,,iptable_rawpost $(if $(CONFIG_IPV6),ip6table_rawpost),50,+kmod-ipt-compat-xtables))
|
2010-07-31 11:39:03 +00:00
|
|
|
$(eval $(call BuildTemplate,rawnat,RAWNAT,xt_RAWDNAT xt_RAWSNAT,xt_RAWNAT,46,+kmod-ipt-compat-xtables))
|
2012-01-04 00:30:53 +00:00
|
|
|
$(eval $(call BuildTemplate,nathelper-rtsp,RTSP Conntrack and NAT,,rtsp/nf_conntrack_rtsp rtsp/nf_nat_rtsp,46,+kmod-ipt-conntrack-extra))
|