build: disable the PKG_CHECK_FORMAT_SECURITY check for the failing packages
[openwrt/staging/lynxis/omap.git] / package / network / utils / xtables-addons / Makefile
1 #
2 # Copyright (C) 2009-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=xtables-addons
12 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.7.0)),1)
13 PKG_VERSION:=2.3
14 PKG_RELEASE:=1
15 PKG_MD5SUM:=7d942729c365a549513511061f74c3e3
16 else
17 PKG_VERSION:=1.45
18 PKG_RELEASE:=3
19 PKG_MD5SUM:=802d2f556a5e545f44e4b69937bf8490
20 PATCH_DIR:=./patches-1.x
21 endif
22
23 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
24 PKG_SOURCE_URL:=@SF/xtables-addons
25 PKG_BUILD_DEPENDS:=iptables
26 PKG_INSTALL:=1
27 PKG_BUILD_PARALLEL:=1
28 PKG_CHECK_FORMAT_SECURITY:=0
29
30 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
31
32 PKG_FIXUP:=autoreconf
33
34 include $(INCLUDE_DIR)/package.mk
35
36 define Package/xtables-addons
37 SECTION:=net
38 CATEGORY:=Network
39 SUBMENU:=Firewall
40 TITLE:=Extensions not distributed in the main Xtables
41 URL:=http://xtables-addons.sourceforge.net/
42 endef
43
44 # uses GNU configure
45
46 CONFIGURE_ARGS+= \
47 --with-kbuild="$(LINUX_DIR)" \
48 --with-xtables="$(STAGING_DIR)/usr" \
49 --with-xtlibdir="/usr/lib/iptables" \
50
51 define Build/Compile
52 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
53 ARCH="$(LINUX_KARCH)" \
54 CROSS_COMPILE="$(TARGET_CROSS)" \
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 DEPMOD="/bin/true" \
57 all
58 endef
59
60 define Build/Install
61 $(MAKE) -C $(PKG_BUILD_DIR) \
62 ARCH="$(LINUX_KARCH)" \
63 CROSS_COMPILE="$(TARGET_CROSS)" \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 DEPMOD="/bin/true" \
66 install
67 endef
68
69 # 1: extension/module suffix used in package name
70 # 2: extension/module display name used in package title/description
71 # 3: list of extensions to package
72 # 4: list of modules to package
73 # 5: module load priority
74 # 6: module depends
75 define BuildTemplate
76
77 ifneq ($(3),)
78 define Package/iptables-mod-$(1)
79 $$(call Package/xtables-addons)
80 CATEGORY:=Network
81 TITLE:=$(2) iptables extension
82 DEPENDS:=iptables $(if $(4),+kmod-ipt-$(1))
83 endef
84
85 define Package/iptables-mod-$(1)/install
86 $(INSTALL_DIR) $$(1)/usr/lib/iptables
87 for m in $(3); do \
88 $(CP) \
89 $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so \
90 $$(1)/usr/lib/iptables/ ; \
91 done
92 endef
93
94 $$(eval $$(call BuildPackage,iptables-mod-$(1)))
95 endif
96
97 ifneq ($(4),)
98 define KernelPackage/ipt-$(1)
99 SUBMENU:=Netfilter Extensions
100 TITLE:=$(2) netfilter module
101 DEPENDS:=+kmod-ipt-core $(5)
102 KCONFIG:=$(6)
103 FILES:=$(foreach mod,$(4),$(PKG_BUILD_DIR)/extensions/$(mod).$(LINUX_KMOD_SUFFIX))
104 AUTOLOAD:=$(call AutoProbe,$(notdir $(4)))
105 endef
106
107 $$(eval $$(call KernelPackage,ipt-$(1)))
108 endif
109
110 endef
111
112
113 define Package/iptaccount
114 $(call Package/xtables-addons)
115 CATEGORY:=Network
116 TITLE:=iptables-mod-account control utility
117 DEPENDS:=iptables +iptables-mod-account
118 endef
119
120 define Package/iptaccount/install
121 $(INSTALL_DIR) $(1)/usr/lib
122 $(INSTALL_DIR) $(1)/usr/sbin
123 $(CP) \
124 $(PKG_INSTALL_DIR)/usr/lib/libxt_ACCOUNT_cl.so* \
125 $(1)/usr/lib/
126 $(CP) \
127 $(PKG_INSTALL_DIR)/usr/sbin/iptaccount \
128 $(1)/usr/sbin/
129 endef
130
131
132 #$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS))
133
134 $(eval $(call BuildTemplate,compat-xtables,API compatibilty layer,,compat_xtables,+IPV6:kmod-ip6tables,CONFIG_NF_CONNTRACK_MARK=y))
135 $(eval $(call BuildTemplate,rawpost,RAWPOST,,iptable_rawpost $(if $(CONFIG_IPV6),ip6table_rawpost),+kmod-ipt-compat-xtables +IPV6:kmod-ip6tables))
136 $(eval $(call BuildTemplate,nathelper-rtsp,RTSP Conntrack and NAT,,rtsp/nf_conntrack_rtsp rtsp/nf_nat_rtsp,+kmod-ipt-conntrack-extra +kmod-ipt-nat))
137
138 $(eval $(call BuildTemplate,account,ACCOUNT,xt_ACCOUNT,ACCOUNT/xt_ACCOUNT,+kmod-ipt-compat-xtables))
139 $(eval $(call BuildTemplate,chaos,CHAOS,xt_CHAOS,xt_CHAOS,+kmod-ipt-compat-xtables +kmod-ipt-delude +kmod-ipt-tarpit))
140 $(eval $(call BuildTemplate,condition,Condition,xt_condition,xt_condition,))
141 $(eval $(call BuildTemplate,delude,DELUDE,xt_DELUDE,xt_DELUDE,+kmod-ipt-compat-xtables))
142 $(eval $(call BuildTemplate,dhcpmac,DHCPMAC,xt_DHCPMAC,xt_DHCPMAC,+kmod-ipt-compat-xtables))
143 $(eval $(call BuildTemplate,dnetmap,DNETMAP,xt_DNETMAP,xt_DNETMAP,+kmod-ipt-compat-xtables +kmod-ipt-nat))
144 $(eval $(call BuildTemplate,fuzzy,fuzzy,xt_fuzzy,xt_fuzzy,))
145 $(eval $(call BuildTemplate,geoip,geoip,xt_geoip,xt_geoip,))
146 $(eval $(call BuildTemplate,iface,iface,xt_iface,xt_iface,))
147 $(eval $(call BuildTemplate,ipmark,IPMARK,xt_IPMARK,xt_IPMARK,+kmod-ipt-compat-xtables))
148 $(eval $(call BuildTemplate,ipp2p,IPP2P,xt_ipp2p,xt_ipp2p,+kmod-ipt-compat-xtables))
149 $(eval $(call BuildTemplate,ipv4options,ipv4options,xt_ipv4options,xt_ipv4options,))
150 $(eval $(call BuildTemplate,length2,length2,xt_length2,xt_length2,+kmod-ipt-compat-xtables))
151 $(eval $(call BuildTemplate,logmark,LOGMARK,xt_LOGMARK,xt_LOGMARK,+kmod-ipt-compat-xtables))
152 $(eval $(call BuildTemplate,lscan,lscan,xt_lscan,xt_lscan,))
153 $(eval $(call BuildTemplate,lua,Lua PacketScript,xt_LUA,LUA/xt_LUA,+kmod-ipt-conntrack-extra))
154 $(eval $(call BuildTemplate,psd,psd,xt_psd,xt_psd,))
155 $(eval $(call BuildTemplate,quota2,quota2,xt_quota2,xt_quota2,))
156 $(eval $(call BuildTemplate,rawnat,RAWNAT,xt_RAWDNAT xt_RAWSNAT,xt_RAWNAT,+kmod-ipt-compat-xtables))
157 $(eval $(call BuildTemplate,steal,STEAL,xt_STEAL,xt_STEAL,+kmod-ipt-compat-xtables))
158 $(eval $(call BuildTemplate,sysrq,SYSRQ,xt_SYSRQ,xt_SYSRQ,+kmod-ipt-compat-xtables))
159 $(eval $(call BuildTemplate,tarpit,TARPIT,xt_TARPIT,xt_TARPIT,+kmod-ipt-compat-xtables +IPV6:kmod-ipv6))
160
161 $(eval $(call BuildPackage,iptaccount))