aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-09-03 21:49:54 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-09-03 21:49:54 +0000
commit847bdaad29a89e237943d9c3b0b98187fe9800eb (patch)
tree67ddd4d46591db32eb0467d06cc58d48806f2fd0 /net
parent05717c697f543cfa3ec8a57b403da9130c8b8668 (diff)
downloadports-847bdaad29a89e237943d9c3b0b98187fe9800eb.tar.gz
ports-847bdaad29a89e237943d9c3b0b98187fe9800eb.zip
Notes
Diffstat (limited to 'net')
-rw-r--r--net/haproxy-devel/Makefile57
-rw-r--r--net/haproxy-devel/distinfo6
-rw-r--r--net/haproxy-devel/files/haproxy.in109
-rw-r--r--net/haproxy-devel/files/patch-Makefile.bsd96
-rw-r--r--net/haproxy-devel/files/pkg-message.in16
-rw-r--r--net/haproxy-devel/pkg-descr13
-rw-r--r--net/haproxy-devel/pkg-plist51
7 files changed, 183 insertions, 165 deletions
diff --git a/net/haproxy-devel/Makefile b/net/haproxy-devel/Makefile
index ecde492e6cdf..6dc5ad645a9f 100644
--- a/net/haproxy-devel/Makefile
+++ b/net/haproxy-devel/Makefile
@@ -6,41 +6,54 @@
#
PORTNAME= haproxy
-PORTVERSION= 1.3.25
+PORTVERSION= 1.5.d2
+DISTVERSION= 1.5-dev2
CATEGORIES= net
-MASTER_SITES= http://haproxy.1wt.eu/download/1.3/src/
+MASTER_SITES= http://haproxy.1wt.eu/download/1.5/src/devel/
PKGNAMESUFFIX= -devel
MAINTAINER= freebsd@linepoint.com
-COMMENT= The Reliable, High Performance TCP/HTTP Load Balancer
+COMMENT= The Reliable, High Performance TCP/HTTP Load Balancer - development branch
-CONFLICTS= haproxy-1.[24]*
+LICENSE_COMB= multi
+LICENSE= GPLv2 LGPL21
+
+CONFLICTS= haproxy-1.[24]\.*
USE_RC_SUBR= haproxy
+USE_GMAKE= YES
+SUB_FILES= pkg-message
+MAN1= haproxy.1
-MAKEFILE= Makefile.bsd
+OPTIONS= PCRE "Use PCRE regex library" On\
+ STATIC_PCRE "Use static PCRE regex library" Off
-do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin
+.include <bsd.port.options.mk>
+
+MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS
+
+.if defined(WITH_PCRE)
+LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
+MAKE_ARGS+= "USE_PCRE=1"
+.endif
+.if defined(WITH_STATIC_PCRE)
+LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
+MAKE_ARGS+= "USE_STATIC_PCRE=1"
+.endif
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin/
+ @${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
- @${MKDIR} ${DOCSDIR}/design-thoughts
- @${MKDIR} ${DOCSDIR}/internals
- @${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCSDIR}/
- @(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} internals ${DOCSDIR}/)
- @(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} design-thoughts ${DOCSDIR}/)
+ (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${DOCSDIR})
+.endif
+.if !defined(NOPORTEXAMPLES)
+ @${MKDIR} ${EXAMPLESDIR}
+ (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR})
.endif
- @${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg \
- ${PREFIX}/etc/haproxy.conf-dist
post-install:
- @${ECHO_MSG} ""
- @${ECHO_MSG} ""
- @${ECHO_MSG} ""
- @${ECHO_MSG} "${PORTNAME} is now installed."
- @${ECHO_MSG} "To configure it, rename ${PREFIX}/etc/haproxy.conf-dist"
- @${ECHO_MSG} "and add haproxy_enable=\"YES\" to /etc/rc.conf"
- @${ECHO_MSG} ""
- @${ECHO_MSG} ""
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/net/haproxy-devel/distinfo b/net/haproxy-devel/distinfo
index fd536a71d808..902c0747dbfd 100644
--- a/net/haproxy-devel/distinfo
+++ b/net/haproxy-devel/distinfo
@@ -1,3 +1,3 @@
-MD5 (haproxy-1.3.25.tar.gz) = 6d46732bfdb569133870169c555c0f6c
-SHA256 (haproxy-1.3.25.tar.gz) = 50dbe7b515c32a643b7caaac32ec3152ba536e589242e4d50ff42618a85f5a78
-SIZE (haproxy-1.3.25.tar.gz) = 662198
+MD5 (haproxy-1.5-dev2.tar.gz) = d2b664c543de6b956810cda2419a2d6f
+SHA256 (haproxy-1.5-dev2.tar.gz) = f4707f5136fc33ab2366baf55d7bcdb4b7cc4e1018d78aaed9bb6eed3a7f6743
+SIZE (haproxy-1.5-dev2.tar.gz) = 804792
diff --git a/net/haproxy-devel/files/haproxy.in b/net/haproxy-devel/files/haproxy.in
index c54a12033cca..8127c9adffe6 100644
--- a/net/haproxy-devel/files/haproxy.in
+++ b/net/haproxy-devel/files/haproxy.in
@@ -1,52 +1,99 @@
#!/bin/sh
-#
-# $FreeBSD$
-#
# PROVIDE: haproxy
-# REQUIRE: NETWORKING SERVERS
-# BEFORE: DAEMON
+# REQUIRE: DAEMON
# KEYWORD: shutdown
+#######
#
# Add the following lines to /etc/rc.conf to enable haproxy:
-# haproxy_enable (bool): Set to "NO" by default.
-# Set it to "YES" to enable haproxy
-# haproxylimits_enable (bool):Set to "NO" by default.
-# Set it to yes to run `limits $limits_args`
-# just before haproxy starts.
-# haproxy_flags (str): Set to "" by default.
-# Extra flags passed to start command
-# haproxylimits_args (str): Default to "-e -C daemon"
-# Arguments of pre-start limits run.
#
+# haproxy_enable (bool): default: "NO"
+# Set to "YES" to enable haproxy
+# haproxy_pidfile (str): default: /var/run/${name}.pid
+# Set to the full path of the pid file
+# haproxy_config (str): default: /usr/local/etc/${name}.conf
+# Set to the full path of the config file
+# haproxy_flags (str): default: Autogenerated using pidfile and config options
+# Set to override with your own options
+#
+#######
+#
+# rc.d Script Runtime Options:
+#
+# start - starts application normally
+# stop - (softstop) stops all proxies and exits once all sessions are closed
+# forcestop - (immediate) stops all proxies and kills active sessions
+# reload - hot-reconfig using "-sf" option (active sessions kept)
+# forcereload - hot-reconfig using "-st" option (active sessions killed)
+# restart - equiv to "stop" then "start"
+# checkconfig - checks configuration file defined in haproxy_config
+#
+#######
+
. /etc/rc.subr
name="haproxy"
rcvar=`set_rcvar`
-
command="%%PREFIX%%/sbin/haproxy"
-pidfile="/var/run/haproxy.pid"
-required_files=%%PREFIX%%/etc/haproxy.conf
-
-[ -z "$haproxy_enable" ] && haproxy_enable="NO"
-[ -z "$haproxy_flags" ] && haproxy_flags="-p ${pidfile} -f /usr/local/etc/haproxy.conf"
-[ -z "$haproxylimits_enable" ] && haproxylimits_enable="NO"
-[ -z "$haproxylimits_args" ] && haproxylimits_args="-e -C daemon"
+# Load Configs/Set Defaults
load_rc_config $name
+: ${haproxy_enable:="NO"}
+: ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"}
+: ${haproxy_pidfile:="/var/run/${name}.pid"}
+: ${haproxy_flags="-q -f ${haproxy_config} -p ${haproxy_pidfile}"}
+
+# Update the globals
+pidfile=${haproxy_pidfile}
+required_files=${haproxy_config}
+
+# Commands: start, stop, restart, reload, checkconfig
+extra_commands="reload checkconfig"
+
+checkconfig_cmd="haproxy_checkconfig"
+reload_cmd="haproxy_reload"
+
+haproxy_reload()
+{
+ # Check configuration file quietly first
+ ${command} -q -c -f ${haproxy_config}
+ if [ $? -ne 0 ]; then
+ echo "Error found in ${haproxy_config} - not reloading current process!"
+ return
+ fi
+ rc_pid=$(check_pidfile ${haproxy_pidfile} ${command})
+ if [ $rc_pid ]; then
+ if [ $rc_force ]; then
+ ${command} ${haproxy_flags} -st ${rc_pid}
+ else
+ ${command} ${haproxy_flags} -sf ${rc_pid}
+ fi
+ else
+ echo "No process found. Maybe $command isn't running?"
+ fi
+}
-checkyesno haproxylimits_enable && \
- start_precmd="eval `/usr/bin/limits ${haproxylimits_args}` 2>/dev/null"
+haproxy_checkconfig()
+{
+ ${command} -c -f ${haproxy_config}
+}
-sig_gracefulstop=SIGUSR1
+haproxy_prestart()
+{
+ ${command} -q -c -f ${haproxy_config}
+ rc_flags=${haproxy_flags}
+}
-haproxy_gracefulstop() {
- echo "Gracefully shutdown haproxy ($rc_pid)"
- kill -${sig_gracefulstop} ${rc_pid}
- }
+haproxy_prestop()
+{
+ # SIGUSR1 = softstop, SIGTERM = faststop
+ if [ $rc_force ]; then
+ sig_stop="SIGTERM"
+ else
+ sig_stop="SIGUSR1"
+ fi
+}
-reload_cmd="$command $haproxy_flags -sf $(cat $pidfile)"
-extra_commands="reload gracefulstop"
run_rc_command "$1"
diff --git a/net/haproxy-devel/files/patch-Makefile.bsd b/net/haproxy-devel/files/patch-Makefile.bsd
deleted file mode 100644
index 7945abb76c69..000000000000
--- a/net/haproxy-devel/files/patch-Makefile.bsd
+++ /dev/null
@@ -1,96 +0,0 @@
---- ./Makefile.bsd.orig 2007-12-05 16:25:44.000000000 -0800
-+++ ./Makefile.bsd 2008-01-17 11:26:47.695860700 -0800
-@@ -1,4 +1,4 @@
--# This makefile is dedicated to OpenBSD (and possibly other BSDs)
-+# This makefile is dedicated to FreeBSD (and possibly other BSDs)
- # You should use it this way :
- # make TARGET=os CPU=cpu
- #
-@@ -9,31 +9,31 @@
-
- # Select target OS. TARGET must match a system for which COPTS and LIBS are
- # correctly defined below.
--TARGET = openbsd
-+TARGET = freebsd
-
- # pass CPU=<cpu_name> to make to optimize for a particular CPU
--CPU = generic
-+#CPU = generic
- #CPU = i586
- #CPU = i686
- #CPU = ultrasparc
-
- # By default, we use libc's regex. WARNING! On Solaris 8/Sparc, group
- # references seem broken using libc ! Use pcre instead.
--REGEX=libc
-+REGEX?=libc
- #REGEX=pcre
- #REGEX=static-pcre
-
- # tools options
--CC = gcc
--LD = gcc
-+CC? = gcc
-+LD? = gcc
-
- # This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
--PCREDIR!= pcre-config --prefix 2>/dev/null || :
--#PCREDIR=/usr/local
-+#PCREDIR!= pcre-config --prefix 2>/dev/null || :
-+PCREDIR=${LOCALBASE}
-
--# This is for OpenBSD 3.0 and above
--COPTS.openbsd = -DENABLE_POLL -DENABLE_KQUEUE
--LIBS.openbsd =
-+# This is for FreeBSD
-+COPTS.freebsd = -DENABLE_POLL -DENABLE_KQUEUE
-+LIBS.freebsd =
-
- # CPU dependant optimizations
- COPTS.generic = -O2
-@@ -55,7 +55,7 @@
-
- # you can enable debug arguments with "DEBUG=-g" or disable them with "DEBUG="
- #DEBUG = -g -DDEBUG_MEMORY -DDEBUG_FULL
--DEBUG = -g
-+#DEBUG = -g
-
- # if small memory footprint is required, you can reduce the buffer size. There
- # are 2 buffers per concurrent session, so 16 kB buffers will eat 32 MB memory
-@@ -63,7 +63,7 @@
- # will avoid the additionnal paramters to overflow a page. 8030 bytes is
- # exactly 5.5 TCP segments of 1460 bytes.
- #SMALL_OPTS =
--SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024
-+#SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024
-
- # redefine this if you want to add some special PATH to include/libs
- ADDINC =
-@@ -75,7 +75,7 @@
- # set some defines when needed.
- # Known ones are -DENABLE_POLL
- # - use -DTPROXY to compile with transparent proxy support.
--DEFINE = -DTPROXY
-+#DEFINE = -DTPROXY
-
- # May be changed to patch PAGE_SIZE on every platform when using dlmalloc
- DLMALLOC_THRES=4096
-@@ -95,7 +95,7 @@
- COPTS = -Iinclude $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) \
- $(SMALL_OPTS) $(VER_OPTS) $(DEFINE)
- LIBS = $(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB)
--CFLAGS = -Wall $(COPTS) $(DEBUG)
-+CFLAGS += -Wall $(COPTS)
- LDFLAGS = -g
-
- OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
-@@ -112,7 +112,8 @@
- all: haproxy
-
- haproxy: $(OBJS) $(OPT_OBJS)
-- $(LD) $(LDFLAGS) -o $@ $> $(LIBS)
-+# $(LD) $(LDFLAGS) -o $@ $> $(LIBS)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $> $(LIBS)
-
- .SUFFIXES: .c.o
-
diff --git a/net/haproxy-devel/files/pkg-message.in b/net/haproxy-devel/files/pkg-message.in
new file mode 100644
index 000000000000..c753a18773e6
--- /dev/null
+++ b/net/haproxy-devel/files/pkg-message.in
@@ -0,0 +1,16 @@
+
+************************************************
+* THIS IS THE DEVELOPMENT BRANCH OF HAPROXY! *
+************************************************
+
+Please use the main port (net/haproxy) for the
+stable branch of haproxy for general production
+use of the software.
+
+Check the following directories for further info:
+ documentation: '%%DOCSDIR%%'
+ examples: '%%EXAMPLESDIR%%'
+
+rc.conf variables listing can be found in:
+ '%%PREFIX%%/etc/rc.d/haproxy'
+
diff --git a/net/haproxy-devel/pkg-descr b/net/haproxy-devel/pkg-descr
index cb0bb8d9e0d3..7ccebfd908ca 100644
--- a/net/haproxy-devel/pkg-descr
+++ b/net/haproxy-devel/pkg-descr
@@ -1,8 +1,9 @@
-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.
+HAProxy is a free, very fast and reliable solution offering high
+availability, load balancing, and proxying for TCP and HTTP-based
+applications. It is particularly suited for web sites crawling under
+very high loads while needing persistence or Layer7 processing.
+
+This is the development branch of the software, which may contain
+new features, but also possibly new bugs.
WWW: http://haproxy.1wt.eu/
diff --git a/net/haproxy-devel/pkg-plist b/net/haproxy-devel/pkg-plist
index a3b95b2b6f64..414b76077a3b 100644
--- a/net/haproxy-devel/pkg-plist
+++ b/net/haproxy-devel/pkg-plist
@@ -1,7 +1,13 @@
-etc/haproxy.conf-dist
sbin/haproxy
+%%PORTDOCS%%%%DOCSDIR%%/acl.fig
%%PORTDOCS%%%%DOCSDIR%%/architecture.txt
%%PORTDOCS%%%%DOCSDIR%%/configuration.txt
+%%PORTDOCS%%%%DOCSDIR%%/gpl.txt
+%%PORTDOCS%%%%DOCSDIR%%/haproxy-en.txt
+%%PORTDOCS%%%%DOCSDIR%%/haproxy-fr.txt
+%%PORTDOCS%%%%DOCSDIR%%/haproxy.1
+%%PORTDOCS%%%%DOCSDIR%%/lgpl.txt
+%%PORTDOCS%%%%DOCSDIR%%/queuing.fig
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends-v0.txt
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends.txt
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/be-fe-changes.txt
@@ -11,12 +17,9 @@ sbin/haproxy
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/how-it-works.txt
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/http_load_time.url
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/sess_par_sec.txt
-%%PORTDOCS%%%%DOCSDIR%%/gpl.txt
-%%PORTDOCS%%%%DOCSDIR%%/haproxy-en.txt
-%%PORTDOCS%%%%DOCSDIR%%/haproxy-fr.txt
%%PORTDOCS%%%%DOCSDIR%%/internals/connect-status.txt
+%%PORTDOCS%%%%DOCSDIR%%/internals/connection-header.txt
%%PORTDOCS%%%%DOCSDIR%%/internals/connection-scale.txt
-%%PORTDOCS%%%%DOCSDIR%%/internals/ebtree
%%PORTDOCS%%%%DOCSDIR%%/internals/header-parser-speed.txt
%%PORTDOCS%%%%DOCSDIR%%/internals/header-tree.txt
%%PORTDOCS%%%%DOCSDIR%%/internals/http-docs.txt
@@ -26,8 +29,42 @@ sbin/haproxy
%%PORTDOCS%%%%DOCSDIR%%/internals/stats-v2.txt
%%PORTDOCS%%%%DOCSDIR%%/internals/stream-sock-states.fig
%%PORTDOCS%%%%DOCSDIR%%/internals/todo.cttproxy
-%%PORTDOCS%%%%DOCSDIR%%/lgpl.txt
-%%PORTDOCS%%%%DOCSDIR%%/tcp-splicing.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%/internals
%%PORTDOCS%%@dirrm %%DOCSDIR%%/design-thoughts
%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/acl-content-sw.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/auth.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/build.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/check
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/check.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/config.rc.haproxy
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/content-sw-sample.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cttproxy-src.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/debug2ansi
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/debug2html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/debugfind
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/examples.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy-1.1.21-flx.1.pkg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy.init
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy.spec
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy.vim
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/init.haproxy
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/init.haproxy.flx0
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/linux-2.4.21-40.EL-custom.diff
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/option-http_proxy.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/rc.highsock
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/stats_haproxy.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tarpit.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test-section-kw.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/url-switching.cfg
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/400.http
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/403.http
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/408.http
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/500.http
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/502.http
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/503.http
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/504.http
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/README
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/errorfiles
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%