[packages_10.03.2] haproxy: merge r28166, r28171, r28179, r28370, r28371, r28960...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 5 Feb 2012 15:16:07 +0000 (15:16 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 5 Feb 2012 15:16:07 +0000 (15:16 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_10.03.2@30206 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/haproxy/Makefile
net/haproxy/files/haproxy.cfg
net/haproxy/files/haproxy.init

index ce6b152..e9b2507 100644 (file)
@@ -1,5 +1,5 @@
 #
-# 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.
@@ -9,12 +9,12 @@
 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
 
@@ -24,7 +24,8 @@ define Package/haproxy
   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
@@ -36,13 +37,13 @@ define Package/haproxy/description
 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
 
index 1c56884..a54f5f5 100644 (file)
@@ -29,6 +29,7 @@ global
        # Daemonize on startup
        daemon
 
+       nosplice
        # Enable debugging
        #debug
 
@@ -41,8 +42,8 @@ global
 # 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
@@ -68,8 +69,8 @@ listen my_smtp_proxy
        # 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
index 73a21e7..1548e31 100644 (file)
@@ -4,28 +4,21 @@
 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)
 }