#
-# Copyright (C) 2010 OpenWrt.org
+# Copyright (C) 2010-2011 OpenWrt.org
# Copyright (C) 2009-2010 Thomas Heil <heil@terminal-consulting.de>
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=haproxy
-PKG_VERSION:=1.4.15
-PKG_RELEASE:=1
+PKG_VERSION:=1.4.19
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src
-PKG_MD5SUM:=c1b4fc6028c6d8e23dde8c91ff47eabe
+PKG_MD5SUM:=41392d738460dbf99295fd928031c6a4
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Network
TITLE:=The Reliable, High Performance TCP/HTTP Load Balancer
URL:=http://haproxy.1wt.eu/
- DEPENDS:=+libpcre +libltdl
+ DEPENDS:=@!LINUX_2_4 +libpcre +libltdl
+ MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
endef
define Package/haproxy/conffiles
endef
define Build/Compile
- $(MAKE) TARGET=$(if $(CONFIG_LINUX_2_4),linux24,linux26) -C $(PKG_BUILD_DIR) \
+ $(MAKE) TARGET=linux26 -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
LD="$(TARGET_CC)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
- SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=8192 -DSYSTEM_MAXCONN=65530" USE_LINUX_TPROXY=1 \
+ SMALL_OPTS="-DBUFSIZE=16384 -DMAXREWRITE=8192 -DSYSTEM_MAXCONN=65530" USE_LINUX_TPROXY=1 USE_LINUX_SPLICE=1 \
all install
endef
# Daemonize on startup
daemon
+ nosplice
# Enable debugging
#debug
# Example HTTP proxy listener
listen my_http_proxy
- # Bind to port 80 and 443 on all interfaces (0.0.0.0)
- bind :80,:443
+ # Bind to port 81 and 444 on all interfaces (0.0.0.0)
+ bind :81,:444
# We're proxying HTTP here...
mode http
# Disable this instance without commenting out the section.
disabled
- # Bind to port 25 and 587 on localhost
- bind 127.0.0.1:25,127.0.0.1:587
+ # Bind to port 26 and 588 on localhost
+ bind 127.0.0.1:26,127.0.0.1:588
# This is a TCP proxy
mode tcp
START=99
STOP=80
+SERVICE_USE_PID=1
+
HAPROXY_BIN="/usr/sbin/haproxy"
HAPROXY_CONFIG="/etc/haproxy.cfg"
HAPROXY_PID="/var/run/haproxy.pid"
-boot() {
-
- #Do nothing on boot
- exit 0
-}
-
start() {
- [ -x "$HAPROXY_BIN" ] || return 1
-
- start-stop-daemon -S -x $HAPROXY_BIN -- \
- -f "$HAPROXY_CONFIG" -V -D -p "$HAPROXY_PID"
+ service_start $HAPROXY_BIN -q -D -f "$HAPROXY_CONFIG" -p "$HAPROXY_PID"
}
stop() {
- service_kill ${HAPROXY_BIN##*/} $HAPROXY_PID
- rm -f $HAPROXY_PID
+ $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -st $(cat $HAPROXY_PID)
+ service_stop $HAPROXY_BIN
}
reload() {
- $HAPROXY_BIN -f $HAPROXY_CONFIG -D -V -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
+ $HAPROXY_BIN -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
}