[package] update xtables-addons to 1.7 (#5369)
[openwrt/svn-archive/archive.git] / net / xtables-addons / Makefile
1 #
2 # Copyright (C) 2009 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 PKG_VERSION:=1.17
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_MD5SUM:=eca2e3f4f4904814e3a301539876fae6
17 PKG_SOURCE_URL:=@SF/xtables-addons
18 PKG_BUILD_DEPENDS:=iptables
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/xtables-addons
23 SECTION:=net
24 CATEGORY:=Base system
25 TITLE:=Extensions not distributed in the main Xtables
26 URL:=http://jengelh.medozas.de/projects/xtables/
27 endef
28
29
30 # uses GNU configure
31
32 CONFIGURE_ARGS+= \
33 --with-kbuild="$(LINUX_DIR)" \
34 --with-xtables="$(STAGING_DIR)/usr" \
35 --with-xtlibdir="/usr/lib/iptables" \
36
37 define Build/Compile
38 $(MAKE) -C $(PKG_BUILD_DIR) \
39 ARCH="$(LINUX_KARCH)" \
40 CROSS_COMPILE="$(TARGET_CROSS)" \
41 DESTDIR="$(PKG_INSTALL_DIR)" \
42 DEPMOD="/bin/true" \
43 all install
44 endef
45
46 # 1: extension/module suffix used in package name
47 # 2: extension/module display name used in package title/description
48 # 3: list of extensions/modules to package
49 # 4: module load priority
50 # 5: module depends
51 define BuildTemplate
52
53 define Package/iptables-mod-$(1)
54 $$(call Package/xtables-addons)
55 TITLE:=$(2) iptables extension
56 DEPENDS:=iptables +kmod-ipt-$(1)
57 endef
58
59 define Package/iptables-mod-$(1)/install
60 $(INSTALL_DIR) $$(1)/usr/lib/iptables
61 for m in $(3); do \
62 $(CP) \
63 $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so \
64 $$(1)/usr/lib/iptables/ ; \
65 done
66 endef
67
68 $$(eval $$(call BuildPackage,iptables-mod-$(1)))
69
70 define KernelPackage/ipt-$(1)
71 SUBMENU:=Netfilter Extensions
72 TITLE:=$(2) netfilter module
73 DEPENDS:=@LINUX_2_6 kmod-ipt-core $(5)
74 FILES:=$(PKG_BUILD_DIR)/extensions/$(3).$(LINUX_KMOD_SUFFIX)
75 AUTOLOAD:=$(call AutoLoad,$(4),$(3))
76 endef
77
78 $$(eval $$(call KernelPackage,ipt-$(1)))
79
80 endef
81
82 define KernelPackage/compat-xtables
83 SUBMENU:=Netfilter Extensions
84 TITLE:=API compatibilty layer module
85 DEPENDS:=@LINUX_2_6
86 FILES:=$(PKG_BUILD_DIR)/extensions/compat_xtables.$(LINUX_KMOD_SUFFIX)
87 AUTOLOAD:=$(call AutoLoad,45,compat_xtables)
88 endef
89
90 $(eval $(call KernelPackage,compat-xtables))
91
92 $(eval $(call BuildTemplate,chaos,CHAOS,xt_CHAOS,47,+kmod-compat-xtables +kmod-ipt-delude +kmod-ipt-tarpit))
93 $(eval $(call BuildTemplate,condition,condition,xt_condition,46))
94 $(eval $(call BuildTemplate,delude,DELUDE,xt_DELUDE,46,+kmod-compat-xtables))
95 $(eval $(call BuildTemplate,tarpit,TARPIT,xt_TARPIT,46,+kmod-compat-xtables))
96 $(eval $(call BuildTemplate,ipp2p,ipp2p,xt_ipp2p,46))