View | Details | Raw Unified | Return to bug 248240
Collapse All | Expand All

(-)b/net/Makefile (+1 lines)
Lines 236-241 Link Here
236
    SUBDIR += haproxy18
236
    SUBDIR += haproxy18
237
    SUBDIR += haproxy19
237
    SUBDIR += haproxy19
238
    SUBDIR += haproxy21
238
    SUBDIR += haproxy21
239
    SUBDIR += haproxy22
239
    SUBDIR += hblock
240
    SUBDIR += hblock
240
    SUBDIR += hexinject
241
    SUBDIR += hexinject
241
    SUBDIR += hinfo
242
    SUBDIR += hinfo
(-)b/net/haproxy22/Makefile (+60 lines)
Added Link Here
1
# Created by: Juraj Lutter <juraj@lutter.sk>
2
# $FreeBSD$
3
4
PORTNAME=	haproxy
5
DISTVERSION=	2.2.1
6
CATEGORIES=	net www
7
PKGNAMESUFFIX=	22
8
MASTER_SITES=	http://www.haproxy.org/download/2.2/src/
9
10
MAINTAINER=	juraj@lutter.sk
11
COMMENT=	Reliable, high performance TCP/HTTP load balancer
12
13
LICENSE=	GPLv2 LGPL21
14
LICENSE_COMB=	multi
15
16
CONFLICTS_INSTALL=	haproxy-[0-9]* haproxy-devel-[0-9]* haproxy17-[0-9]* haproxy18-[0-9]* haproxy19-[0-9]*
17
18
USES=		compiler:c++11-lang cpe gmake
19
USE_RC_SUBR=	haproxy
20
21
MAKE_ARGS=	TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \
22
		USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_ACCEPT4=1 \
23
		CC="${CC}" DEBUG_CFLAGS="" CPU_CFLAGS="${CFLAGS}"
24
25
OPTIONS_DEFINE=		DOCS EXAMPLES LUA OPENSSL DEVICEATLAS PROMEX
26
OPTIONS_RADIO=		PCRE
27
OPTIONS_RADIO_PCRE=	DPCRE SPCRE
28
DPCRE_DESC=		Link dynamically
29
SPCRE_DESC=		Link statically
30
DEVICEATLAS_DESC=	DeviceAtlas Device Detection support
31
PROMEX_DESC=		Enable Prometheus exporter
32
OPTIONS_DEFAULT=	SPCRE OPENSSL
33
34
DPCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
35
DPCRE_MAKE_ARGS=	USE_PCRE=1 USE_PCRE_JIT=1
36
SPCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
37
SPCRE_MAKE_ARGS=	USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1
38
DEVICEATLAS_LIB_DEPENDS=	libda.so:net/deviceatlas-enterprise-c
39
DEVICEATLAS_MAKE_ARGS=		USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include
40
PROMEX_MAKE_ARGS=	EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
41
OPENSSL_USES=		ssl
42
OPENSSL_MAKE_ARGS=	USE_OPENSSL=1 SSL_LIB=${OPENSSLLIB} SSL_INC=${OPENSSLINC}
43
LUA_USES=		lua:53
44
LUA_MAKE_ARGS=		USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER}
45
46
.include <bsd.port.pre.mk>
47
48
post-build:
49
	cd ${WRKSRC}/contrib/halog && ${MAKE_CMD} ${MAKE_ENV}
50
51
do-install:
52
	${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${STAGEDIR}${PREFIX}/sbin/
53
	${INSTALL_PROGRAM} ${WRKSRC}/contrib/halog/halog ${STAGEDIR}${PREFIX}/sbin/
54
	${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
55
	${MKDIR} ${STAGEDIR}${DOCSDIR}
56
	(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR})
57
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
58
	(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR})
59
60
.include <bsd.port.post.mk>
(-)b/net/haproxy22/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1595589679
2
SHA256 (haproxy-2.2.1.tar.gz) = 536552af1316807c01de727ad3dac84b3a2f5285db32e9bfdfe234e47ff9d124
3
SIZE (haproxy-2.2.1.tar.gz) = 2868436
(-)b/net/haproxy22/files/haproxy.in (+133 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
# PROVIDE: haproxy
7
# REQUIRE: DAEMON LOGIN
8
# KEYWORD: shutdown
9
10
#
11
# Add the following lines to /etc/rc.conf to enable haproxy:
12
#
13
# haproxy_enable (bool):	default: "NO"
14
#				Set to "YES" to enable haproxy
15
# haproxy_pidfile (str):	default: /var/run/haproxy.pid
16
#				Set to the full path of the pid file
17
# haproxy_config (str):		default: %%PREFIX%%/etc/haproxy.conf
18
#				Set to the full path of the config file
19
# haproxy_flags (str):		default: Autogenerated using pidfile and config options
20
#				Set to override with your own options
21
# haproxy_profiles (str):	default: empty
22
# Set to space-separated list of profiles: for each profile separate haproxy
23
# process will be spawned, with haproxy-${profile}.conf config file.
24
# You can override default pidfile and config file for each profile with
25
# haproxy_${profile}_config and haproxy_${profile}_pidfile.
26
27
. /etc/rc.subr
28
29
name="haproxy"
30
rcvar=haproxy_enable
31
command="%%PREFIX%%/sbin/haproxy"
32
extra_commands="reload configtest hardstop hardreload softreload"
33
reload_cmd="haproxy_reload"
34
hardreload_cmd="haproxy_reload"
35
hardreload_precmd="def_hardreload_option"
36
softreload_cmd="haproxy_reload"
37
softreload_precmd="def_softreload_option"
38
stop_cmd="haproxy_stop"
39
hardstop_cmd="haproxy_stop"
40
hardstop_precmd="def_hardstop_signal"
41
42
: ${haproxy_enable:="NO"}
43
: ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"}
44
: ${haproxy_socket:="/var/run/${name}/socket"}
45
pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"}
46
47
def_hardreload_option()
48
{
49
    reload_opt="-st"
50
}
51
52
def_softreload_option()
53
{
54
    reload_opt="-x ${haproxy_socket} -sf"
55
}
56
57
def_hardstop_signal()
58
{
59
    sig_stop="TERM"
60
}
61
62
load_rc_config $name
63
64
is_valid_profile() {
65
    local profile
66
    for profile in $haproxy_profiles; do
67
        if [ "$profile" = "$1" ]; then
68
            return 0
69
        fi
70
    done
71
    return 1
72
}
73
74
if [ -n "$2" ]; then
75
    profile=$2
76
    if ! is_valid_profile $profile; then
77
        echo "$0: no such profile ($profile) defined in ${name}_profiles."
78
        exit 1
79
    fi
80
    eval haproxy_config="\${haproxy_${profile}_config:-%%PREFIX%%/etc/haproxy-${profile}.conf}"
81
    eval pidfile="\${haproxy_${profile}_pidfile:-/var/run/haproxy-${profile}.pid}"
82
else
83
    if [ "x${haproxy_profiles}" != "x" -a "x$1" != "x" ]; then
84
        for profile in ${haproxy_profiles}; do
85
            echo "===> ${name} profile: ${profile}"
86
            %%PREFIX%%/etc/rc.d/haproxy $1 ${profile}
87
            retcode="$?"
88
            if [ ${retcode} -ne 0 ]; then
89
                failed="${profile} (${retcode}) ${failed:-}"
90
            else
91
                success="${profile} ${success:-}"
92
            fi
93
        done
94
        exit 0
95
    fi
96
fi
97
98
: ${haproxy_flags:="-q -f ${haproxy_config} -p ${pidfile}"}
99
configtest_cmd="$command -c -f $haproxy_config"
100
start_precmd="$command -q -c -f $haproxy_config"
101
required_files=$haproxy_config
102
sig_stop=SIGUSR1
103
reload_opt="-sf"
104
105
haproxy_reload()
106
{
107
	${command} -q -c -f ${haproxy_config}
108
	if [ $? -ne 0 ]; then
109
	    err 1 "Error found in ${haproxy_config} - not reloading current process!"
110
	fi
111
	rc_pid=$(check_pidfile ${pidfile} ${command})
112
	if [ $rc_pid ]; then
113
		${command} ${haproxy_flags} $reload_opt $(cat ${pidfile})
114
	else
115
		_run_rc_notrunning
116
		return 1
117
	fi
118
}
119
120
haproxy_stop()
121
{
122
	rc_pid=$(check_pidfile ${pidfile} ${command})
123
	if [ $rc_pid ]; then
124
		rc_pid=$(cat ${pidfile})
125
		kill -$sig_stop $rc_pid
126
		wait_for_pids $rc_pid
127
	else
128
		_run_rc_notrunning
129
		return 1
130
	fi
131
}
132
133
run_rc_command "$1"
(-)b/net/haproxy22/pkg-descr (+6 lines)
Added Link Here
1
HAProxy is a free, very fast and reliable solution offering high
2
availability, load balancing, and proxying for TCP and HTTP-based
3
applications. It is particularly suited for web sites crawling under
4
very high loads while needing persistence or Layer7 processing.
5
6
WWW: http://www.haproxy.org
(-)b/net/haproxy22/pkg-plist (+98 lines)
Added Link Here
1
man/man1/haproxy.1.gz
2
sbin/halog
3
sbin/haproxy
4
%%PORTDOCS%%%%DOCSDIR%%/51Degrees-device-detection.txt
5
%%PORTDOCS%%%%DOCSDIR%%/DeviceAtlas-device-detection.txt
6
%%PORTDOCS%%%%DOCSDIR%%/SOCKS4.protocol.txt
7
%%PORTDOCS%%%%DOCSDIR%%/SPOE.txt
8
%%PORTDOCS%%%%DOCSDIR%%/WURFL-device-detection.txt
9
%%PORTDOCS%%%%DOCSDIR%%/acl.fig
10
%%PORTDOCS%%%%DOCSDIR%%/architecture.txt
11
%%PORTDOCS%%%%DOCSDIR%%/close-options.txt
12
%%PORTDOCS%%%%DOCSDIR%%/coding-style.txt
13
%%PORTDOCS%%%%DOCSDIR%%/configuration.txt
14
%%PORTDOCS%%%%DOCSDIR%%/cookie-options.txt
15
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends-v0.txt
16
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/backends.txt
17
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/be-fe-changes.txt
18
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/binding-possibilities.txt
19
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/config-language.txt
20
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/connection-reuse.txt
21
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/connection-sharing.txt
22
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/dynamic-buffers.txt
23
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/entities-v2.txt
24
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/how-it-works.txt
25
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/http2.txt
26
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/http_load_time.url
27
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/rate-shaping.txt
28
%%PORTDOCS%%%%DOCSDIR%%/design-thoughts/sess_par_sec.txt
29
%%PORTDOCS%%%%DOCSDIR%%/gpl.txt
30
%%PORTDOCS%%%%DOCSDIR%%/haproxy.1
31
%%PORTDOCS%%%%DOCSDIR%%/internals/acl.txt
32
%%PORTDOCS%%%%DOCSDIR%%/internals/body-parsing.txt
33
%%PORTDOCS%%%%DOCSDIR%%/internals/buffer-api.txt
34
%%PORTDOCS%%%%DOCSDIR%%/internals/connect-status.txt
35
%%PORTDOCS%%%%DOCSDIR%%/internals/connection-header.txt
36
%%PORTDOCS%%%%DOCSDIR%%/internals/connection-scale.txt
37
%%PORTDOCS%%%%DOCSDIR%%/internals/entities-v2.txt
38
%%PORTDOCS%%%%DOCSDIR%%/internals/entities.fig
39
%%PORTDOCS%%%%DOCSDIR%%/internals/entities.pdf
40
%%PORTDOCS%%%%DOCSDIR%%/internals/entities.svg
41
%%PORTDOCS%%%%DOCSDIR%%/internals/entities.txt
42
%%PORTDOCS%%%%DOCSDIR%%/internals/filters.txt
43
%%PORTDOCS%%%%DOCSDIR%%/internals/hashing.txt
44
%%PORTDOCS%%%%DOCSDIR%%/internals/header-parser-speed.txt
45
%%PORTDOCS%%%%DOCSDIR%%/internals/header-tree.txt
46
%%PORTDOCS%%%%DOCSDIR%%/internals/http-cookies.txt
47
%%PORTDOCS%%%%DOCSDIR%%/internals/http-docs.txt
48
%%PORTDOCS%%%%DOCSDIR%%/internals/http-parsing.txt
49
%%PORTDOCS%%%%DOCSDIR%%/internals/htx-api.txt
50
%%PORTDOCS%%%%DOCSDIR%%/internals/initcalls.txt
51
%%PORTDOCS%%%%DOCSDIR%%/internals/list.fig
52
%%PORTDOCS%%%%DOCSDIR%%/internals/listener-states.fig
53
%%PORTDOCS%%%%DOCSDIR%%/internals/listener-states.png
54
%%PORTDOCS%%%%DOCSDIR%%/internals/lua_socket.fig
55
%%PORTDOCS%%%%DOCSDIR%%/internals/lua_socket.pdf
56
%%PORTDOCS%%%%DOCSDIR%%/internals/naming.txt
57
%%PORTDOCS%%%%DOCSDIR%%/internals/notes-layers.txt
58
%%PORTDOCS%%%%DOCSDIR%%/internals/pattern.dia
59
%%PORTDOCS%%%%DOCSDIR%%/internals/pattern.pdf
60
%%PORTDOCS%%%%DOCSDIR%%/internals/polling-states.fig
61
%%PORTDOCS%%%%DOCSDIR%%/internals/repartition-be-fe-fi.txt
62
%%PORTDOCS%%%%DOCSDIR%%/internals/sequence.fig
63
%%PORTDOCS%%%%DOCSDIR%%/internals/ssl_cert.dia
64
%%PORTDOCS%%%%DOCSDIR%%/internals/stats-v2.txt
65
%%PORTDOCS%%%%DOCSDIR%%/internals/stream-sock-states.fig
66
%%PORTDOCS%%%%DOCSDIR%%/intro.txt
67
%%PORTDOCS%%%%DOCSDIR%%/lgpl.txt
68
%%PORTDOCS%%%%DOCSDIR%%/linux-syn-cookies.txt
69
%%PORTDOCS%%%%DOCSDIR%%/lua-api/Makefile
70
%%PORTDOCS%%%%DOCSDIR%%/lua-api/_static/channel.fig
71
%%PORTDOCS%%%%DOCSDIR%%/lua-api/_static/channel.png
72
%%PORTDOCS%%%%DOCSDIR%%/lua-api/conf.py
73
%%PORTDOCS%%%%DOCSDIR%%/lua-api/index.rst
74
%%PORTDOCS%%%%DOCSDIR%%/lua.txt
75
%%PORTDOCS%%%%DOCSDIR%%/management.txt
76
%%PORTDOCS%%%%DOCSDIR%%/netscaler-client-ip-insertion-protocol.txt
77
%%PORTDOCS%%%%DOCSDIR%%/network-namespaces.txt
78
%%PORTDOCS%%%%DOCSDIR%%/peers.txt
79
%%PORTDOCS%%%%DOCSDIR%%/peers-v2.0.txt
80
%%PORTDOCS%%%%DOCSDIR%%/proxy-protocol.txt
81
%%PORTDOCS%%%%DOCSDIR%%/queuing.fig
82
%%PORTDOCS%%%%DOCSDIR%%/regression-testing.txt
83
%%PORTDOCS%%%%DOCSDIR%%/seamless_reload.txt
84
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/acl-content-sw.cfg
85
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/content-sw-sample.cfg
86
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/400.http
87
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/403.http
88
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/408.http
89
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/500.http
90
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/502.http
91
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/503.http
92
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/504.http
93
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/errorfiles/README
94
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/haproxy.init
95
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/option-http_proxy.cfg
96
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/socks4.cfg
97
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/transparent_proxy.cfg
98
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/wurfl-example.cfg

Return to bug 248240