diff options
author | Will Andrews <will@FreeBSD.org> | 2003-06-03 05:20:23 +0000 |
---|---|---|
committer | Will Andrews <will@FreeBSD.org> | 2003-06-03 05:20:23 +0000 |
commit | 3b53fe79c8632215d36edacc6b809dfb0e8c0ede (patch) | |
tree | c30f0ec1ccf1e945871384617cb03f22813ad867 /net/haproxy-devel/files | |
parent | Add libukcprog 1.0, generally useful low level routines. (diff) |
Add haproxy 1.1.20, a high-performance and highly-robust
TCP/HTTP load balancer.
PR: 51630
Submitted by: Clement Laforet
Notes
Notes:
svn path=/head/; revision=82171
Diffstat (limited to 'net/haproxy-devel/files')
-rw-r--r-- | net/haproxy-devel/files/haproxy.sh | 22 | ||||
-rw-r--r-- | net/haproxy-devel/files/patch-Makefile | 61 |
2 files changed, 83 insertions, 0 deletions
diff --git a/net/haproxy-devel/files/haproxy.sh b/net/haproxy-devel/files/haproxy.sh new file mode 100644 index 000000000000..e51b6a855662 --- /dev/null +++ b/net/haproxy-devel/files/haproxy.sh @@ -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 diff --git a/net/haproxy-devel/files/patch-Makefile b/net/haproxy-devel/files/patch-Makefile new file mode 100644 index 000000000000..682befbd7c94 --- /dev/null +++ b/net/haproxy-devel/files/patch-Makefile @@ -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 |