Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 May 2007 11:20:01 +0000 (UTC)
From:      Hugo Saro <hugo@barafranca.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        araujo@FreeBSD.org
Subject:   ports/112934: New Port: net/haproxy-devel The development branch of net/haproxy
Message-ID:  <20070524112001.6BC60C4C10@mail.barafranca.com>
Resent-Message-ID: <200705241050.l4OAo3UW050690@freefall.freebsd.org>

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

>Number:         112934
>Category:       ports
>Synopsis:       New Port: net/haproxy-devel The development branch of net/haproxy
>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:   Thu May 24 10:50:02 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:
#
#       haproxy-devel
#       haproxy-devel/files
#       haproxy-devel/files/patch-Makefile.bsd
#       haproxy-devel/files/haproxy.in
#       haproxy-devel/Makefile
#       haproxy-devel/pkg-descr
#       haproxy-devel/pkg-plist
#       haproxy-devel/distinfo
#
echo c - haproxy-devel
mkdir -p haproxy-devel > /dev/null 2>&1
echo c - haproxy-devel/files
mkdir -p haproxy-devel/files > /dev/null 2>&1
echo x - haproxy-devel/files/patch-Makefile.bsd
sed 's/^X//' >haproxy-devel/files/patch-Makefile.bsd << 'END-of-haproxy-devel/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-haproxy-devel/files/patch-Makefile.bsd
echo x - haproxy-devel/files/haproxy.in
sed 's/^X//' >haproxy-devel/files/haproxy.in << 'END-of-haproxy-devel/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-haproxy-devel/files/haproxy.in
echo x - haproxy-devel/Makefile
sed 's/^X//' >haproxy-devel/Makefile << 'END-of-haproxy-devel/Makefile'
X# New ports collection makefile for:    haproxy-devel
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.11
XPORTREVISION=  3
XCATEGORIES=     net
XMASTER_SITES=   http://haproxy.1wt.eu/download/1.3/src/
XPKGNAMESUFFIX=  -devel
XDISTFILES=      ${DISTNAME}.${PORTREVISION}.tar.gz
X
XMAINTAINER=    hugo@barafranca.com
XCOMMENT=       The Reliable, High Performance TCP/HTTP Load Balancer
X
XWRKSRC=                ${WRKDIR}/${PORTNAME}-${PORTVERSION}.${PORTREVISION}
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-haproxy-devel/Makefile
echo x - haproxy-devel/pkg-descr
sed 's/^X//' >haproxy-devel/pkg-descr << 'END-of-haproxy-devel/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-haproxy-devel/pkg-descr
echo x - haproxy-devel/pkg-plist
sed 's/^X//' >haproxy-devel/pkg-plist << 'END-of-haproxy-devel/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/connect-status.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-haproxy-devel/pkg-plist
echo x - haproxy-devel/distinfo
sed 's/^X//' >haproxy-devel/distinfo << 'END-of-haproxy-devel/distinfo'
XMD5 (haproxy-1.3.11.3.tar.gz) = c06d1a009bdada9680846166c2d90a51
XSHA256 (haproxy-1.3.11.3.tar.gz) = 8c2fd0d17ea56c84afa481fe7055da759122d3518c8fd460bb12805aa77387cf
XSIZE (haproxy-1.3.11.3.tar.gz) =  343977
END-of-haproxy-devel/distinfo
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



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