2 # Copyright (C) 2006-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_MAINTAINER
:=Florian Eckert
<fe@dev.tdt.de
>, \
14 Aaron Goodman
<aaronjg@alumni.stanford.edu
>
16 PKG_CONFIG_DEPENDS
:=CONFIG_IPV6
18 include $(INCLUDE_DIR
)/package.mk
23 SUBMENU
:=Routing and Redirection
29 +iptables-mod-conntrack-extra \
32 TITLE
:=Multiwan hotplug script with connection tracking support
33 MAINTAINER
:=Florian Eckert
<fe@dev.tdt.de
>
37 define Package
/mwan3
/description
38 Hotplug script which makes configuration of multiple WAN interfaces simple
39 and manageable. With loadbalancing
/failover support for up to
250 wan
40 interfaces
, connection tracking and an easy to manage traffic ruleset.
43 define Package
/mwan3
/conffiles
48 define Package
/mwan3
/postinst
50 if
[ -z
"$${IPKG_INSTROOT}" ] && [ -x
/etc
/init.d
/rpcd
]; then
51 /etc
/init.d
/rpcd restart
56 define Package
/mwan3
/postrm
58 if
[ -z
"$${IPKG_INSTROOT}" ] && [ -x
/etc
/init.d
/rpcd
]; then
59 /etc
/init.d
/rpcd restart
65 $(TARGET_CC
) $(CFLAGS
) $(LDFLAGS
) $(FPIC
) \
67 -o
$(PKG_BUILD_DIR
)/libwrap_mwan3_sockopt.so
.1.0 \
68 $(if
$(CONFIG_IPV6
),-DCONFIG_IPV6
) \
69 $(PKG_BUILD_DIR
)/sockopt_wrap.c \
73 define Package
/mwan3
/install
74 $(INSTALL_DIR
) $(1)/etc
/config
75 $(INSTALL_CONF
) .
/files
/etc
/config
/mwan3 \
78 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
79 $(INSTALL_DATA
) .
/files
/etc
/hotplug.d
/iface
/15-mwan3 \
80 $(1)/etc
/hotplug.d
/iface
/
81 $(INSTALL_DATA
) .
/files
/etc
/hotplug.d
/iface
/16-mwan3-user \
82 $(1)/etc
/hotplug.d
/iface
/
84 $(INSTALL_DIR
) $(1)/etc
/init.d
85 $(INSTALL_BIN
) .
/files
/etc
/init.d
/mwan3 \
88 $(INSTALL_DIR
) $(1)/lib
/mwan3
89 $(INSTALL_DATA
) .
/files
/lib
/mwan3
/common.sh \
91 $(INSTALL_DATA
) .
/files
/lib
/mwan3
/mwan3.sh \
94 $(INSTALL_DIR
) $(1)/usr
/libexec
/rpcd
95 $(INSTALL_BIN
) .
/files
/usr
/libexec
/rpcd
/mwan3 \
96 $(1)/usr
/libexec
/rpcd
/
98 $(INSTALL_DIR
) $(1)/usr
/sbin
99 $(INSTALL_BIN
) .
/files
/usr
/sbin
/mwan3 \
101 $(INSTALL_BIN
) .
/files
/usr
/sbin
/mwan3rtmon \
103 $(INSTALL_BIN
) .
/files
/usr
/sbin
/mwan3track \
106 $(INSTALL_DIR
) $(1)/etc
107 $(INSTALL_BIN
) .
/files
/etc
/mwan3.user \
110 $(CP
) $(PKG_BUILD_DIR
)/libwrap_mwan3_sockopt.so
.1.0 $(1)/lib
/mwan3
/
112 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
113 $(INSTALL_DATA
) .
/files
/etc
/uci-defaults
/mwan3-migrate-flush_conntrack \
114 $(1)/etc
/uci-defaults
/
117 $(eval
$(call BuildPackage
,mwan3
))