Add haproxy 1.1.20, a high-performance and highly-robust
TCP/HTTP load balancer. PR: 51630 Submitted by: Clement Laforet
This commit is contained in:
parent
373b1542f0
commit
3b53fe79c8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=82171
@ -204,6 +204,7 @@
|
||||
SUBDIR += gutenfetch
|
||||
SUBDIR += h2n
|
||||
SUBDIR += hagelslag
|
||||
SUBDIR += haproxy
|
||||
SUBDIR += hawk
|
||||
SUBDIR += hesiod
|
||||
SUBDIR += hinfo
|
||||
|
36
net/haproxy-devel/Makefile
Normal file
36
net/haproxy-devel/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
# New ports collection Makefile for: haproxy
|
||||
# Date created: Apr 30, 2003
|
||||
# Whom: Clement Laforet
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= haproxy
|
||||
PORTVERSION= 1.1.20
|
||||
PORTREVISION= 0
|
||||
CATEGORIES= net www
|
||||
MASTER_SITES= http://w.ods.org/tools/haproxy/ \
|
||||
http://w.ods.org/tools/haproxy/old/
|
||||
|
||||
MAINTAINER= sheepkiller@cultdeadsheep.org
|
||||
COMMENT= High-performance and highly-robust TCP/HTTP load balancer
|
||||
|
||||
STATS_INTERVAL= 0
|
||||
REGEX_TYPE?= libc
|
||||
|
||||
MAKE_ENV+= REGEX=${REGEX_TYPE} INTERVAL=${STATS_INTERVAL}
|
||||
|
||||
.if defined(WITH_PCRE)
|
||||
REGEX_TYPE= pcre
|
||||
PKGNAMESUFFIX= -pcre
|
||||
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin
|
||||
${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg \
|
||||
${PREFIX}/etc/haproxy.cfg.sample
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/haproxy.sh \
|
||||
${PREFIX}/etc/rc.d/haproxy.sh.sample
|
||||
|
||||
.include <bsd.port.mk>
|
1
net/haproxy-devel/distinfo
Normal file
1
net/haproxy-devel/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (haproxy-1.1.20.tar.gz) = 0017b1fac1a61c3daccc504000edc4f2
|
22
net/haproxy-devel/files/haproxy.sh
Normal file
22
net/haproxy-devel/files/haproxy.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/haproxy ] && \
|
||||
[ -r ${PREFIX}/etc/haproxy.cfg ] && \
|
||||
${PREFIX}/sbin/haproxy -f ${PREFIX}/etc/haproxy.cfg && \
|
||||
echo -n ' haproxy'
|
||||
|
||||
;;
|
||||
stop)
|
||||
killall haproxy && echo -n ' haproxy'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
61
net/haproxy-devel/files/patch-Makefile
Normal file
61
net/haproxy-devel/files/patch-Makefile
Normal file
@ -0,0 +1,61 @@
|
||||
--- Makefile.orig Wed Apr 16 21:43:09 2003
|
||||
+++ Makefile Wed Apr 30 17:07:18 2003
|
||||
@@ -1,22 +1,18 @@
|
||||
# Select target OS. TARGET must match a system for which COPTS and LIBS are
|
||||
# correctly defined below.
|
||||
# You can set it on make's command line. eg: make TARGET=solaris
|
||||
-TARGET = linux24
|
||||
+#TARGET = linux24
|
||||
#TARGET = linux22
|
||||
#TARGET = solaris
|
||||
#TARGET = solarisv9
|
||||
-#TARGET = openbsd
|
||||
-
|
||||
-CC = gcc
|
||||
-LD = gcc
|
||||
+TARGET = openbsd
|
||||
|
||||
# By default, we use libc's regex.
|
||||
-REGEX=libc
|
||||
#REGEX=pcre
|
||||
|
||||
# This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
|
||||
-PCREDIR := $(shell pcre-config --prefix 2>/dev/null)
|
||||
-#PCREDIR=/usr/local
|
||||
+#PCREDIR := $(shell pcre-config --prefix 2>/dev/null)
|
||||
+PCREDIR=${LOCALBASE}
|
||||
|
||||
# This is for Linux 2.4 with netfilter
|
||||
COPTS.linux24 = -O2 -DNETFILTER
|
||||
@@ -44,8 +40,8 @@
|
||||
COPTS.pcre=-DUSE_PCRE -I$(PCREDIR)/include
|
||||
LIBS.pcre=-L$(PCREDIR)/lib -lpcreposix -lpcre
|
||||
|
||||
-#DEBUG =
|
||||
-DEBUG = -g
|
||||
+DEBUG =
|
||||
+#DEBUG = -g
|
||||
|
||||
COPTS=$(COPTS.$(TARGET)) $(COPTS.$(REGEX))
|
||||
LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX))
|
||||
@@ -53,16 +49,13 @@
|
||||
# - use -DSTATTIME=0 to disable statistics, else specify an interval in
|
||||
# milliseconds.
|
||||
# - use -DTPROXY to compile with transparent proxy support.
|
||||
-CFLAGS = -Wall $(COPTS) $(DEBUG) -DSTATTIME=0 -DTPROXY
|
||||
-LDFLAGS = -g
|
||||
+CFLAGS+= -Wall $(COPTS) $(DEBUG) -DSTATTIME=$(INTERVAL)
|
||||
+LDFLAGS+=
|
||||
|
||||
all: haproxy
|
||||
|
||||
-haproxy: haproxy.o
|
||||
- $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
-
|
||||
-%.o: %.c
|
||||
- $(CC) $(CFLAGS) -c -o $@ $<
|
||||
+haproxy:
|
||||
+ $(CC) $(CFLAGS) haproxy.c $(LIBS) $(LDFLAGS) -o haproxy
|
||||
|
||||
clean:
|
||||
rm -f *.[oas] *~ core haproxy test nohup.out gmon.out
|
9
net/haproxy-devel/pkg-descr
Normal file
9
net/haproxy-devel/pkg-descr
Normal file
@ -0,0 +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. It currently lacks SSL
|
||||
and keep-alive, both of which are planned.
|
||||
|
||||
WWW: http://w.ods.org/tools/haproxy/
|
3
net/haproxy-devel/pkg-plist
Normal file
3
net/haproxy-devel/pkg-plist
Normal file
@ -0,0 +1,3 @@
|
||||
sbin/haproxy
|
||||
etc/haproxy.cfg.sample
|
||||
etc/rc.d/haproxy.sh.sample
|
36
net/haproxy/Makefile
Normal file
36
net/haproxy/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
# New ports collection Makefile for: haproxy
|
||||
# Date created: Apr 30, 2003
|
||||
# Whom: Clement Laforet
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= haproxy
|
||||
PORTVERSION= 1.1.20
|
||||
PORTREVISION= 0
|
||||
CATEGORIES= net www
|
||||
MASTER_SITES= http://w.ods.org/tools/haproxy/ \
|
||||
http://w.ods.org/tools/haproxy/old/
|
||||
|
||||
MAINTAINER= sheepkiller@cultdeadsheep.org
|
||||
COMMENT= High-performance and highly-robust TCP/HTTP load balancer
|
||||
|
||||
STATS_INTERVAL= 0
|
||||
REGEX_TYPE?= libc
|
||||
|
||||
MAKE_ENV+= REGEX=${REGEX_TYPE} INTERVAL=${STATS_INTERVAL}
|
||||
|
||||
.if defined(WITH_PCRE)
|
||||
REGEX_TYPE= pcre
|
||||
PKGNAMESUFFIX= -pcre
|
||||
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${PREFIX}/sbin
|
||||
${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg \
|
||||
${PREFIX}/etc/haproxy.cfg.sample
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/haproxy.sh \
|
||||
${PREFIX}/etc/rc.d/haproxy.sh.sample
|
||||
|
||||
.include <bsd.port.mk>
|
1
net/haproxy/distinfo
Normal file
1
net/haproxy/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (haproxy-1.1.20.tar.gz) = 0017b1fac1a61c3daccc504000edc4f2
|
22
net/haproxy/files/haproxy.sh
Normal file
22
net/haproxy/files/haproxy.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/haproxy ] && \
|
||||
[ -r ${PREFIX}/etc/haproxy.cfg ] && \
|
||||
${PREFIX}/sbin/haproxy -f ${PREFIX}/etc/haproxy.cfg && \
|
||||
echo -n ' haproxy'
|
||||
|
||||
;;
|
||||
stop)
|
||||
killall haproxy && echo -n ' haproxy'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
61
net/haproxy/files/patch-Makefile
Normal file
61
net/haproxy/files/patch-Makefile
Normal file
@ -0,0 +1,61 @@
|
||||
--- Makefile.orig Wed Apr 16 21:43:09 2003
|
||||
+++ Makefile Wed Apr 30 17:07:18 2003
|
||||
@@ -1,22 +1,18 @@
|
||||
# Select target OS. TARGET must match a system for which COPTS and LIBS are
|
||||
# correctly defined below.
|
||||
# You can set it on make's command line. eg: make TARGET=solaris
|
||||
-TARGET = linux24
|
||||
+#TARGET = linux24
|
||||
#TARGET = linux22
|
||||
#TARGET = solaris
|
||||
#TARGET = solarisv9
|
||||
-#TARGET = openbsd
|
||||
-
|
||||
-CC = gcc
|
||||
-LD = gcc
|
||||
+TARGET = openbsd
|
||||
|
||||
# By default, we use libc's regex.
|
||||
-REGEX=libc
|
||||
#REGEX=pcre
|
||||
|
||||
# This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
|
||||
-PCREDIR := $(shell pcre-config --prefix 2>/dev/null)
|
||||
-#PCREDIR=/usr/local
|
||||
+#PCREDIR := $(shell pcre-config --prefix 2>/dev/null)
|
||||
+PCREDIR=${LOCALBASE}
|
||||
|
||||
# This is for Linux 2.4 with netfilter
|
||||
COPTS.linux24 = -O2 -DNETFILTER
|
||||
@@ -44,8 +40,8 @@
|
||||
COPTS.pcre=-DUSE_PCRE -I$(PCREDIR)/include
|
||||
LIBS.pcre=-L$(PCREDIR)/lib -lpcreposix -lpcre
|
||||
|
||||
-#DEBUG =
|
||||
-DEBUG = -g
|
||||
+DEBUG =
|
||||
+#DEBUG = -g
|
||||
|
||||
COPTS=$(COPTS.$(TARGET)) $(COPTS.$(REGEX))
|
||||
LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX))
|
||||
@@ -53,16 +49,13 @@
|
||||
# - use -DSTATTIME=0 to disable statistics, else specify an interval in
|
||||
# milliseconds.
|
||||
# - use -DTPROXY to compile with transparent proxy support.
|
||||
-CFLAGS = -Wall $(COPTS) $(DEBUG) -DSTATTIME=0 -DTPROXY
|
||||
-LDFLAGS = -g
|
||||
+CFLAGS+= -Wall $(COPTS) $(DEBUG) -DSTATTIME=$(INTERVAL)
|
||||
+LDFLAGS+=
|
||||
|
||||
all: haproxy
|
||||
|
||||
-haproxy: haproxy.o
|
||||
- $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
-
|
||||
-%.o: %.c
|
||||
- $(CC) $(CFLAGS) -c -o $@ $<
|
||||
+haproxy:
|
||||
+ $(CC) $(CFLAGS) haproxy.c $(LIBS) $(LDFLAGS) -o haproxy
|
||||
|
||||
clean:
|
||||
rm -f *.[oas] *~ core haproxy test nohup.out gmon.out
|
9
net/haproxy/pkg-descr
Normal file
9
net/haproxy/pkg-descr
Normal file
@ -0,0 +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. It currently lacks SSL
|
||||
and keep-alive, both of which are planned.
|
||||
|
||||
WWW: http://w.ods.org/tools/haproxy/
|
3
net/haproxy/pkg-plist
Normal file
3
net/haproxy/pkg-plist
Normal file
@ -0,0 +1,3 @@
|
||||
sbin/haproxy
|
||||
etc/haproxy.cfg.sample
|
||||
etc/rc.d/haproxy.sh.sample
|
Loading…
Reference in New Issue
Block a user