Date: 30 Apr 2003 15:55:20 -0000 From: Clement Laforet <sheepkiller@cultdeadsheep.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Clement Laforet <sheepkiller@cultdeadsheep.org> Subject: ports/51630: [new port]: net/haproxy (HTTP load balancer) Message-ID: <20030430155520.28039.qmail@cultdeadsheep.org> Resent-Message-ID: <200304301600.h3UG0Km0048104@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 51630 >Category: ports >Synopsis: [new port]: net/haproxy (HTTP load balancer) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 30 09:00:20 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Clement Laforet >Release: FreeBSD 4.6-STABLE i386 >Organization: cotds >Environment: System: FreeBSD goofy.cultdeadsheep.org 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Jul 4 10:05:12 CEST 2002 root@goofy.cultdeadsheep.org:/usr/obj/usr/src/sys/GOOFY i386 >Description: HAproxy is a high-performance and highly-robust TCP/HTTP load balancer which provides cookie-based persistence, automatic failover, header insertion, deletion, modification on the fly, advanced logging contents to help trouble- shooting buggy applications and/or networks, and a few other features. It uses its own state machine to achieve up to ten thousands hits per second on modern hardware, even with thousands simultaneous connections. It currently lacks SSL and keep-alive, both of which are planned. http://w.ods.org/tools/haproxy/ >How-To-Repeat: N/A. >Fix: --- haproxy.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # haproxy # haproxy/files # haproxy/files/patch-Makefile # haproxy/files/haproxy.sh # haproxy/Makefile # haproxy/distinfo # haproxy/pkg-descr # haproxy/pkg-plist # echo c - haproxy mkdir -p haproxy > /dev/null 2>&1 echo c - haproxy/files mkdir -p haproxy/files > /dev/null 2>&1 echo x - haproxy/files/patch-Makefile sed 's/^X//' >haproxy/files/patch-Makefile << 'END-of-haproxy/files/patch-Makefile' X--- Makefile.orig Wed Apr 16 21:43:09 2003 X+++ Makefile Wed Apr 30 17:07:18 2003 X@@ -1,22 +1,18 @@ X # Select target OS. TARGET must match a system for which COPTS and LIBS are X # correctly defined below. X # You can set it on make's command line. eg: make TARGET=solaris X-TARGET = linux24 X+#TARGET = linux24 X #TARGET = linux22 X #TARGET = solaris X #TARGET = solarisv9 X-#TARGET = openbsd X- X-CC = gcc X-LD = gcc X+TARGET = openbsd X X # By default, we use libc's regex. X-REGEX=libc X #REGEX=pcre X X # This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre X-PCREDIR := $(shell pcre-config --prefix 2>/dev/null) X-#PCREDIR=/usr/local X+#PCREDIR := $(shell pcre-config --prefix 2>/dev/null) X+PCREDIR=${LOCALBASE} X X # This is for Linux 2.4 with netfilter X COPTS.linux24 = -O2 -DNETFILTER X@@ -44,8 +40,8 @@ X COPTS.pcre=-DUSE_PCRE -I$(PCREDIR)/include X LIBS.pcre=-L$(PCREDIR)/lib -lpcreposix -lpcre X X-#DEBUG = X-DEBUG = -g X+DEBUG = X+#DEBUG = -g X X COPTS=$(COPTS.$(TARGET)) $(COPTS.$(REGEX)) X LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX)) X@@ -53,16 +49,13 @@ X # - use -DSTATTIME=0 to disable statistics, else specify an interval in X # milliseconds. X # - use -DTPROXY to compile with transparent proxy support. X-CFLAGS = -Wall $(COPTS) $(DEBUG) -DSTATTIME=0 -DTPROXY X-LDFLAGS = -g X+CFLAGS+= -Wall $(COPTS) $(DEBUG) -DSTATTIME=$(INTERVAL) X+LDFLAGS+= X X all: haproxy X X-haproxy: haproxy.o X- $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) X- X-%.o: %.c X- $(CC) $(CFLAGS) -c -o $@ $< X+haproxy: X+ $(CC) $(CFLAGS) haproxy.c $(LIBS) $(LDFLAGS) -o haproxy X X clean: X rm -f *.[oas] *~ core haproxy test nohup.out gmon.out END-of-haproxy/files/patch-Makefile echo x - haproxy/files/haproxy.sh sed 's/^X//' >haproxy/files/haproxy.sh << 'END-of-haproxy/files/haproxy.sh' X#!/bin/sh X Xif ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then X echo "$0: Cannot determine the PREFIX" >&2 X exit 1 Xfi X Xcase "$1" in X start) X [ -x ${PREFIX}/sbin/haproxy ] && \ X [ -r ${PREFIX}/etc/haproxy.cfg ] && \ X ${PREFIX}/sbin/haproxy -f ${PREFIX}/etc/haproxy.cfg && \ X echo -n ' haproxy' X X ;; X stop) X killall haproxy && echo -n ' haproxy' X ;; X *) X echo "Usage: `basename $0` {start|stop}" >&2 X ;; Xesac END-of-haproxy/files/haproxy.sh echo x - haproxy/Makefile sed 's/^X//' >haproxy/Makefile << 'END-of-haproxy/Makefile' X# New ports collection Makefile for: haproxy X# Date created: Apr 30, 2003 X# Whom: Clement Laforet X# X# $FreeBSD$ X# X XPORTNAME= haproxy XPORTVERSION= 1.1.20 XPORTREVISION= 0 XCATEGORIES= net www XMASTER_SITES= http://w.ods.org/tools/haproxy/ \ X http://w.ods.org/tools/haproxy/old/ X XMAINTAINER= sheepkiller@cultdeadsheep.org XCOMMENT= High-performance and highly-robust TCP/HTTP load balancer X XSTATS_INTERVAL= 0 XREGEX_TYPE?= libc X XMAKE_ENV+= REGEX=${REGEX_TYPE} INTERVAL=${STATS_INTERVAL} X X.if defined(WITH_PCRE) XREGEX_TYPE= pcre XPKGNAMESUFFIX= -pcre XLIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre X.endif X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin X ${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg \ X ${PREFIX}/etc/haproxy.cfg.sample X ${INSTALL_SCRIPT} ${FILESDIR}/haproxy.sh \ X ${PREFIX}/etc/rc.d/haproxy.sh.sample X X.include <bsd.port.mk> X END-of-haproxy/Makefile echo x - haproxy/distinfo sed 's/^X//' >haproxy/distinfo << 'END-of-haproxy/distinfo' XMD5 (haproxy-1.1.20.tar.gz) = 0017b1fac1a61c3daccc504000edc4f2 END-of-haproxy/distinfo echo x - haproxy/pkg-descr sed 's/^X//' >haproxy/pkg-descr << 'END-of-haproxy/pkg-descr' XHAproxy is a high-performance and highly-robust TCP/HTTP load balancer which Xprovides cookie-based persistence, automatic failover, header insertion, Xdeletion, modification on the fly, advanced logging contents to help trouble- Xshooting buggy applications and/or networks, and a few other features. It uses Xits own state machine to achieve up to ten thousands hits per second on modern Xhardware, even with thousands simultaneous connections. It currently lacks SSL Xand keep-alive, both of which are planned. X XWWW: http://w.ods.org/tools/haproxy/ END-of-haproxy/pkg-descr echo x - haproxy/pkg-plist sed 's/^X//' >haproxy/pkg-plist << 'END-of-haproxy/pkg-plist' Xsbin/haproxy Xetc/haproxy.cfg.sample Xetc/rc.d/haproxy.sh.sample END-of-haproxy/pkg-plist exit --- haproxy.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030430155520.28039.qmail>