source: packages/net/xtables-addons/Makefile @ 19318

Last change on this file since 19318 was 19318, checked in by jow, 6 years ago

[packages] xtables-addons: update to v1.22 and fix compile against iptables 1.4.6

File size: 2.7 KB
Line 
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
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=xtables-addons
12PKG_VERSION:=1.22
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_MD5SUM:=990e2d84a1767c8247c92ae7b11e53a9
17PKG_SOURCE_URL:=@SF/xtables-addons
18PKG_BUILD_DEPENDS:=iptables
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/xtables-addons
23  SECTION:=net
24  CATEGORY:=Network
25  TITLE:=Extensions not distributed in the main Xtables
26  URL:=http://xtables-addons.sourceforge.net/
27endef
28
29# uses GNU configure
30
31CONFIGURE_ARGS+= \
32        --with-kbuild="$(LINUX_DIR)" \
33        --with-xtables="$(STAGING_DIR)/usr" \
34        --with-xtlibdir="/usr/lib/iptables" \
35
36define Build/Compile
37        $(MAKE) -C $(PKG_BUILD_DIR) \
38                ARCH="$(LINUX_KARCH)" \
39                CROSS_COMPILE="$(TARGET_CROSS)" \
40                DESTDIR="$(PKG_INSTALL_DIR)" \
41                DEPMOD="/bin/true" \
42                LDFLAGS="$(TARGET_LDFLAGS)" \
43                all install
44endef
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 to package
49# 4: list of modules to package
50# 5: module load priority
51# 6: module depends
52define BuildTemplate
53
54 ifneq ($(3),)
55  define Package/iptables-mod-$(1)
56    $$(call Package/xtables-addons)
57    CATEGORY:=Network
58    TITLE:=$(2) iptables extension
59    DEPENDS:= @LINUX_2_6 iptables $(if $(4),+kmod-ipt-$(1))
60  endef
61
62  define Package/iptables-mod-$(1)/install
63        $(INSTALL_DIR) $$(1)/usr/lib/iptables
64        for m in $(3); do \
65                $(CP) \
66                        $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so \
67                        $$(1)/usr/lib/iptables/ ; \
68        done
69  endef
70
71  $$(eval $$(call BuildPackage,iptables-mod-$(1)))
72 endif
73
74 ifneq ($(4),)
75  define KernelPackage/ipt-$(1)
76    SUBMENU:=Netfilter Extensions
77    TITLE:=$(2) netfilter module
78    DEPENDS:= @LINUX_2_6 kmod-ipt-core $(6)
79    FILES:=$(foreach mod,$(4),$(PKG_BUILD_DIR)/extensions/$(mod).$(LINUX_KMOD_SUFFIX))
80    AUTOLOAD:=$(call AutoLoad,$(5),$(notdir $(4)))
81  endef
82
83  $$(eval $$(call KernelPackage,ipt-$(1)))
84 endif
85
86endef
87
88#$(eval $(call BuildTemplate,SUFFIX,DESCRIPTION,EXTENSION,MODULE,PRIORITY,DEPENDS))
89$(eval $(call BuildTemplate,compat-xtables,API compatibilty layer,,compat_xtables,45,))
90$(eval $(call BuildTemplate,chaos,CHAOS,xt_CHAOS,xt_CHAOS,47,+kmod-ipt-compat-xtables +kmod-ipt-delude +kmod-ipt-tarpit))
91$(eval $(call BuildTemplate,condition,Condition,xt_condition,xt_condition,46,))
92$(eval $(call BuildTemplate,delude,DELUDE,xt_DELUDE,xt_DELUDE,46,+kmod-ipt-compat-xtables))
93$(eval $(call BuildTemplate,tarpit,TARPIT,xt_TARPIT,xt_TARPIT,46,+kmod-ipt-compat-xtables))
94$(eval $(call BuildTemplate,ipp2p,IPP2P,xt_ipp2p,xt_ipp2p,46,))
Note: See TracBrowser for help on using the repository browser.