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
28 +iptables-mod-conntrack-extra \
31 TITLE
:=Multiwan hotplug script with connection tracking support
32 MAINTAINER
:=Florian Eckert
<fe@dev.tdt.de
>
36 define Package
/mwan3
/description
37 Hotplug script which makes configuration of multiple WAN interfaces simple
38 and manageable. With loadbalancing
/failover support for up to
250 wan
39 interfaces
, connection tracking and an easy to manage traffic ruleset.
42 define Package
/mwan3
/conffiles
47 define Package
/mwan3
/postinst
49 if
[ -z
"$${IPKG_INSTROOT}" ] && [ -x
/etc
/init.d
/rpcd
]; then
50 /etc
/init.d
/rpcd restart
55 define Package
/mwan3
/postrm
57 if
[ -z
"$${IPKG_INSTROOT}" ] && [ -x
/etc
/init.d
/rpcd
]; then
58 /etc
/init.d
/rpcd restart
64 $(TARGET_CC
) $(CFLAGS
) $(LDFLAGS
) $(FPIC
) \
66 -o
$(PKG_BUILD_DIR
)/libwrap_mwan3_sockopt.so
.1.0 \
67 $(if
$(CONFIG_IPV6
),-DCONFIG_IPV6
) \
68 $(PKG_BUILD_DIR
)/sockopt_wrap.c \
72 define Package
/mwan3
/install
73 $(INSTALL_DIR
) $(1)/etc
/config
74 $(INSTALL_CONF
) .
/files
/etc
/config
/mwan3 \
77 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
78 $(INSTALL_DATA
) .
/files
/etc
/hotplug.d
/iface
/15-mwan3 \
79 $(1)/etc
/hotplug.d
/iface
/
80 $(INSTALL_DATA
) .
/files
/etc
/hotplug.d
/iface
/16-mwan3-user \
81 $(1)/etc
/hotplug.d
/iface
/
83 $(INSTALL_DIR
) $(1)/etc
/init.d
84 $(INSTALL_BIN
) .
/files
/etc
/init.d
/mwan3 \
87 $(INSTALL_DIR
) $(1)/lib
/mwan3
88 $(INSTALL_DATA
) .
/files
/lib
/mwan3
/common.sh \
90 $(INSTALL_DATA
) .
/files
/lib
/mwan3
/mwan3.sh \
93 $(INSTALL_DIR
) $(1)/usr
/libexec
/rpcd
94 $(INSTALL_BIN
) .
/files
/usr
/libexec
/rpcd
/mwan3 \
95 $(1)/usr
/libexec
/rpcd
/
97 $(INSTALL_DIR
) $(1)/usr
/sbin
98 $(INSTALL_BIN
) .
/files
/usr
/sbin
/mwan3 \
100 $(INSTALL_BIN
) .
/files
/usr
/sbin
/mwan3rtmon \
102 $(INSTALL_BIN
) .
/files
/usr
/sbin
/mwan3track \
105 $(INSTALL_DIR
) $(1)/etc
106 $(INSTALL_BIN
) .
/files
/etc
/mwan3.user \
109 $(CP
) $(PKG_BUILD_DIR
)/libwrap_mwan3_sockopt.so
.1.0 $(1)/lib
/mwan3
/
111 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
112 $(INSTALL_DATA
) .
/files
/etc
/uci-defaults
/mwan3-migrate-flush_conntrack \
113 $(1)/etc
/uci-defaults
/
116 $(eval
$(call BuildPackage
,mwan3
))