Skip site navigation (1)Skip section navigation (2)
Date:      Fri,  4 May 2007 04:34:13 +0000 (UTC)
From:      Hugo Saro <hugo@barafranca.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/112407: New port: net/haproxy13 -- haproxy branch 1.3
Message-ID:  <20070504043413.B29E5C3909@mail.barafranca.com>
Resent-Message-ID: <200705040430.l444U5Qo060383@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         112407
>Category:       ports
>Synopsis:       New port: net/haproxy13 -- haproxy branch 1.3
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 04 04:30:04 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Hugo Saro
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:

>Description:
>How-To-Repeat:
>Fix:
# 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:
#
#       haproxy13
#       haproxy13/files
#       haproxy13/files/patch-Makefile.bsd
#       haproxy13/files/haproxy.in
#       haproxy13/pkg-plist
#       haproxy13/distinfo
#       haproxy13/pkg-descr
#       haproxy13/Makefile
#
echo c - haproxy13
mkdir -p haproxy13 > /dev/null 2>&1
echo c - haproxy13/files
mkdir -p haproxy13/files > /dev/null 2>&1
echo x - haproxy13/files/patch-Makefile.bsd
sed 's/^X//' >haproxy13/files/patch-Makefile.bsd << 'END-of-haproxy13/files/patch-Makefile.bsd'
X--- Makefile.bsd.orig  Mon Apr 16 00:33:37 2007
X+++ Makefile.bsd       Fri May  4 04:05:12 2007
X@@ -1,4 +1,4 @@
X-# This makefile is dedicated to OpenBSD (and possibly other BSDs)
X+# This makefile is dedicated to FreeBSD (and possibly other BSDs)
X # You should use it this way :
X #   make TARGET=os CPU=cpu
X
X@@ -6,31 +6,31 @@
X
X # Select target OS. TARGET must match a system for which COPTS and LIBS are
X # correctly defined below.
X-TARGET = openbsd
X+TARGET = freebsd
X
X # pass CPU=<cpu_name> to make to optimize for a particular CPU
X-CPU = generic
X+#CPU = generic
X #CPU = i586
X #CPU = i686
X #CPU = ultrasparc
X
X # By default, we use libc's regex. WARNING! On Solaris 8/Sparc, group
X # references seem broken using libc ! Use pcre instead.
X-REGEX=libc
X+REGEX?=libc
X #REGEX=pcre
X #REGEX=static-pcre
X
X # tools options
X-CC = gcc
X-LD = gcc
X+CC? = gcc
X+LD? = gcc
X
X # This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
X-PCREDIR!= pcre-config --prefix 2>/dev/null || :
X-#PCREDIR=/usr/local
X+#PCREDIR!= pcre-config --prefix 2>/dev/null || :
X+PCREDIR=${LOCALBASE}
X
X-# This is for OpenBSD 3.0 and above
X-COPTS.openbsd = -DENABLE_POLL -DENABLE_KQUEUE
X-LIBS.openbsd =
X+# This is for FreeBSD
X+COPTS.freebsd = -DENABLE_POLL -DENABLE_KQUEUE
X+LIBS.freebsd =
X
X # CPU dependant optimizations
X COPTS.generic = -O2
X@@ -52,7 +52,7 @@
X
X # you can enable debug arguments with "DEBUG=-g" or disable them with "DEBUG="
X #DEBUG = -g -DDEBUG_MEMORY -DDEBUG_FULL
X-DEBUG = -g
X+#DEBUG = -g
X
X # if small memory footprint is required, you can reduce the buffer size. There
X # are 2 buffers per concurrent session, so 16 kB buffers will eat 32 MB memory
X@@ -60,7 +60,7 @@
X # will avoid the additionnal paramters to overflow a page. 8030 bytes is
X # exactly 5.5 TCP segments of 1460 bytes.
X #SMALL_OPTS =
X-SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024
X+#SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024
X
X # redefine this if you want to add some special PATH to include/libs
X ADDINC =
X@@ -69,7 +69,7 @@
X # set some defines when needed.
X # Known ones are -DENABLE_POLL
X # - use -DTPROXY to compile with transparent proxy support.
X-DEFINE = -DTPROXY
X+#DEFINE = -DTPROXY
X
X # global options
X TARGET_OPTS=$(COPTS.$(TARGET))
X@@ -79,7 +79,7 @@
X COPTS=-Iinclude $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) $(SMALL_OPTS) $(DEFINE)
X LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB)
X
X-CFLAGS = -Wall $(COPTS) $(DEBUG)
X+CFLAGS += -Wall $(COPTS)
X LDFLAGS = -g
X
X OBJS = src/haproxy.o src/list.o src/chtbl.o src/hashpjw.o src/base64.o \
X@@ -93,7 +93,9 @@
X all: haproxy
X
X haproxy: $(OBJS)
X-      $(LD) $(LDFLAGS) -o $@ $> $(LIBS)
X+#     $(LD) $(LDFLAGS) -o $@ $> $(LIBS)
X+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $> $(LIBS)
X+
X
X .SUFFIXES: .c.o
X
END-of-haproxy13/files/patch-Makefile.bsd
echo x - haproxy13/files/haproxy.in
sed 's/^X//' >haproxy13/files/haproxy.in << 'END-of-haproxy13/files/haproxy.in'
X#!/bin/sh
X#
X# $FreeBSD:
X#
X
X# PROVIDE: haproxy
X# REQUIRE: NETWORKING SERVERS
X# BEFORE: DAEMON
X# KEYWORD: shutdown
X
X#
X# Add the following lines to /etc/rc.conf to enable haproxy:
X# haproxy_enable (bool):      Set to "NO" by default.
X#                             Set it to "YES" to enable haproxy
X# haproxylimits_enable (bool):Set to "NO" by default.
X#                             Set it to yes to run `limits $limits_args`
X#                             just before haproxy starts.
X# haproxy_flags (str):        Set to "" by default.
X#                             Extra flags passed to start command
X# haproxylimits_args (str):   Default to "-e -C daemon"
X#                             Arguments of pre-start limits run.
X#
X. %%RC_SUBR%%
X
Xname="haproxy"
Xrcvar=`set_rcvar`
X
Xcommand="%%PREFIX%%/sbin/haproxy"
Xpidfile="/var/run/haproxy.pid"
Xrequired_files=%%PREFIX%%/etc/haproxy.conf
X
X[ -z "$haproxy_enable" ]       && haproxy_enable="NO"
X[ -z "$haproxy_flags" ]        && haproxy_flags="-p ${pidfile} -f /usr/local/etc/haproxy.conf"
X[ -z "$haproxylimits_enable" ] && haproxylimits_enable="NO"
X[ -z "$haproxylimits_args" ]   && haproxylimits_args="-e -C daemon"
X
Xload_rc_config $name
X
Xcheckyesno haproxylimits_enable && \
X                       start_precmd="eval `/usr/bin/limits ${haproxylimits_args}` 2>/dev/null"
X
Xsig_gracefulstop=SIGUSR1
X
Xhaproxy_gracefulstop() {
X       echo "Gracefully shutdown haproxy ($rc_pid)"
X       kill -${sig_gracefulstop} ${rc_pid}
X       }
X
Xextra_commands="gracefulstop"
Xrun_rc_command "$1"
END-of-haproxy13/files/haproxy.in
echo x - haproxy13/pkg-plist
sed 's/^X//' >haproxy13/pkg-plist << 'END-of-haproxy13/pkg-plist'
Xsbin/haproxy
X%%PORTDOCS%%%%DOCSDIR%%/architecture.txt
X%%PORTDOCS%%%%DOCSDIR%%/gpl.txt
X%%PORTDOCS%%%%DOCSDIR%%/lgpl.txt
X%%PORTDOCS%%%%DOCSDIR%%/haproxy-en.txt
X%%PORTDOCS%%%%DOCSDIR%%/haproxy-fr.txt
X%%PORTDOCS%%%%DOCSDIR%%/tcp-splicing.txt
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends-v0.txt
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends.txt
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/be-fe-changes.txt
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/buffers.fig
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/config-language.txt
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/cttproxy-changes.txt
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/how-it-works.txt
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/http_load_time.url
X%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/sess_par_sec.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/connection-scale.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/header-parser-speed.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/header-tree.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/http-docs.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/http-parsing.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/naming.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/repartition-be-fe-fi.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/stats-v2.txt
X%%PORTDOCS%%%%DOCSDIR%%/internals/todo.cttproxy
Xetc/haproxy.conf-dist
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/design-thoughts
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/internals
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X
END-of-haproxy13/pkg-plist
echo x - haproxy13/distinfo
sed 's/^X//' >haproxy13/distinfo << 'END-of-haproxy13/distinfo'
XMD5 (haproxy-1.3.9.tar.gz) = 20e28de8573b20fc28e0be41188ecb59
XSHA256 (haproxy-1.3.9.tar.gz) = 499dcf3b20cdaf7b016c1aca0bdd59b394c15106983448b9fda87b47b8d16b0e
XSIZE (haproxy-1.3.9.tar.gz) = 306826
END-of-haproxy13/distinfo
echo x - haproxy13/pkg-descr
sed 's/^X//' >haproxy13/pkg-descr << 'END-of-haproxy13/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.
X
XWWW: http://haproxy.1wt.eu/
END-of-haproxy13/pkg-descr
echo x - haproxy13/Makefile
sed 's/^X//' >haproxy13/Makefile << 'END-of-haproxy13/Makefile'
X# New ports collection makefile for:    haproxy13
X# Date created:         Thu May  3 16:30:19 WEST 2007
X# Whom:                 Hugo Saro <hugo@barafranca.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=      haproxy
XPORTVERSION=   1.3.9
X#PORTREVISION= 1
XCATEGORIES=     net
XMASTER_SITES=   http://haproxy.1wt.eu/download/1.3/src/
X
XMAINTAINER=    hugo@barafranca.com
XCOMMENT=       The Reliable, High Performance TCP/HTTP Load Balancer
X
XDISTNAME=       haproxy-${PORTVERSION}
XDISTFILES=      ${DISTNAME}.tar.gz
X
XCONFLICTS=     haproxy-1.2*
XUSE_RC_SUBR=   haproxy
X
XMAKEFILE=       Makefile.bsd
X
Xdo-install:
X       @${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin
X.if !defined(NOPORTDOCS)
X       @${MKDIR} ${DOCSDIR}
X       @${MKDIR} ${DOCSDIR}/design-thoughts
X       @${MKDIR} ${DOCSDIR}/internals
X       @${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCSDIR}
X       @${INSTALL_DATA} ${WRKSRC}/doc/design-thoughts/* ${DOCSDIR}/design-thoughts/
X       @${INSTALL_DATA} ${WRKSRC}/doc/internals/* ${DOCSDIR}/internals/
X       @${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg \
X                               ${LOCALBASE}/etc/haproxy.conf-dist
X.endif
X
Xpost-install:
X       @${ECHO_MSG} ""
X       @${ECHO_MSG} ""
X       @${ECHO_MSG} ""
X       @${ECHO_MSG} "haproxy ${PORTVERSION} is now installed."
X       @${ECHO_MSG} "To configure it, rename ${LOCALBASE}/etc/haproxy.conf-dist"
X       @${ECHO_MSG} "and add haproxy_enable=\"YES\" to /etc/rc.conf"
X       @${ECHO_MSG} ""
X       @${ECHO_MSG} ""
X
X.include <bsd.port.mk>
END-of-haproxy13/Makefile
exit
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070504043413.B29E5C3909>