diff --git a/net/haproxy20/Makefile b/net/haproxy20/Makefile index cb76e0ebd448..4880c648dfbc 100644 --- a/net/haproxy20/Makefile +++ b/net/haproxy20/Makefile @@ -1,62 +1,63 @@ PORTNAME= haproxy DISTVERSION= 2.0.31 +PORTREVISION= 1 CATEGORIES= net www PKGNAMESUFFIX= 20 MASTER_SITES= http://www.haproxy.org/download/2.0/src/ MAINTAINER= demon@FreeBSD.org COMMENT= Reliable, high performance TCP/HTTP load balancer WWW= https://www.haproxy.org LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi CONFLICTS_INSTALL= haproxy haproxy-devel haproxy17 haproxy18 USES= compiler:c++11-lang cpe gmake USE_RC_SUBR= haproxy MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \ USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_ACCEPT4=1 \ CC="${CC}" DEBUG_CFLAGS="" CPU_CFLAGS="${CFLAGS}" OPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS PROMEX OPTIONS_RADIO= PCRE OPTIONS_RADIO_PCRE= DPCRE SPCRE DPCRE_DESC= Link dynamically SPCRE_DESC= Link statically DEVICEATLAS_DESC= DeviceAtlas Device Detection support PROMEX_DESC= Enable Prometheus exporter OPTIONS_DEFAULT= SPCRE OPENSSL PROMEX DPCRE_LIB_DEPENDS= libpcre.so:devel/pcre DPCRE_MAKE_ARGS= USE_PCRE=1 USE_PCRE_JIT=1 SPCRE_LIB_DEPENDS= libpcre.so:devel/pcre SPCRE_MAKE_ARGS= USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1 DEVICEATLAS_LIB_DEPENDS= libda.so:net/deviceatlas-enterprise-c DEVICEATLAS_MAKE_ARGS= USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include PROMEX_MAKE_ARGS= EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" OPENSSL_USES= ssl OPENSSL_MAKE_ARGS= USE_OPENSSL=1 SSL_LIB=${OPENSSLLIB} SSL_INC=${OPENSSLINC} LUA_USES= lua:53 LUA_MAKE_ARGS= USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER} .include .if ${ARCH} == "amd64" || ${ARCH} == "i386" MAKE_ARGS+= USE_REGPARM=1 .endif post-build: cd ${WRKSRC}/contrib/halog && ${MAKE_CMD} ${MAKE_ENV} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_PROGRAM} ${WRKSRC}/contrib/halog/halog ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}) ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) .include diff --git a/net/haproxy20/files/haproxy.in b/net/haproxy20/files/haproxy.in index e9eb2147c412..e13077b01dc3 100644 --- a/net/haproxy20/files/haproxy.in +++ b/net/haproxy20/files/haproxy.in @@ -1,130 +1,131 @@ #!/bin/sh # PROVIDE: haproxy # REQUIRE: DAEMON LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable haproxy: # # haproxy_enable (bool): default: "NO" # Set to "YES" to enable haproxy # haproxy_pidfile (str): default: /var/run/haproxy.pid # Set to the full path of the pid file # haproxy_config (str): default: %%PREFIX%%/etc/haproxy.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 # haproxy_profiles (str): default: empty # Set to space-separated list of profiles: for each profile separate haproxy # process will be spawned, with haproxy-${profile}.conf config file. # You can override default pidfile and config file for each profile with # haproxy_${profile}_config and haproxy_${profile}_pidfile. . /etc/rc.subr name="haproxy" rcvar=haproxy_enable command="%%PREFIX%%/sbin/haproxy" extra_commands="reload configtest hardstop hardreload softreload" reload_cmd="haproxy_reload" hardreload_cmd="haproxy_reload" hardreload_precmd="def_hardreload_option" softreload_cmd="haproxy_reload" softreload_precmd="def_softreload_option" stop_cmd="haproxy_stop" hardstop_cmd="haproxy_stop" hardstop_precmd="def_hardstop_signal" : ${haproxy_enable:="NO"} : ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"} : ${haproxy_socket:="/var/run/${name}/socket"} pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"} def_hardreload_option() { reload_opt="-st" } def_softreload_option() { reload_opt="-x ${haproxy_socket} -sf" } def_hardstop_signal() { sig_stop="TERM" } load_rc_config $name is_valid_profile() { local profile for profile in $haproxy_profiles; do if [ "$profile" = "$1" ]; then return 0 fi done return 1 } if [ -n "$2" ]; then profile=$2 if ! is_valid_profile $profile; then echo "$0: no such profile ($profile) defined in ${name}_profiles." exit 1 fi eval haproxy_config="\${haproxy_${profile}_config:-%%PREFIX%%/etc/haproxy-${profile}.conf}" + eval haproxy_fib="\${haproxy_${profile}_fib:${haproxy_fib}}" eval pidfile="\${haproxy_${profile}_pidfile:-/var/run/haproxy-${profile}.pid}" else if [ "x${haproxy_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${haproxy_profiles}; do echo "===> ${name} profile: ${profile}" %%PREFIX%%/etc/rc.d/haproxy $1 ${profile} retcode="$?" if [ ${retcode} -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi : ${haproxy_flags:="-q -f ${haproxy_config} -p ${pidfile}"} configtest_cmd="$command -c -f $haproxy_config" start_precmd="$command -q -c -f $haproxy_config" required_files=$haproxy_config sig_stop=SIGUSR1 reload_opt="-sf" haproxy_reload() { ${command} -q -c -f ${haproxy_config} if [ $? -ne 0 ]; then err 1 "Error found in ${haproxy_config} - not reloading current process!" fi rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then ${command} ${haproxy_flags} $reload_opt $(cat ${pidfile}) else _run_rc_notrunning return 1 fi } haproxy_stop() { rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then rc_pid=$(cat ${pidfile}) kill -$sig_stop $rc_pid wait_for_pids $rc_pid else _run_rc_notrunning return 1 fi } run_rc_command "$1" diff --git a/net/haproxy22/Makefile b/net/haproxy22/Makefile index 32aa2de9f32a..507790a7a38a 100644 --- a/net/haproxy22/Makefile +++ b/net/haproxy22/Makefile @@ -1,62 +1,63 @@ PORTNAME= haproxy DISTVERSION= 2.2.29 +PORTREVISION= 1 CATEGORIES= net www PKGNAMESUFFIX= 22 MASTER_SITES= http://www.haproxy.org/download/2.2/src/ MAINTAINER= demon@FreeBSD.org COMMENT= Reliable, high performance TCP/HTTP load balancer WWW= https://www.haproxy.org LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi CONFLICTS_INSTALL= haproxy-devel haproxy17 haproxy18 haproxy20 USES= compiler:c++11-lang cpe gmake USE_RC_SUBR= haproxy MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \ USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_ACCEPT4=1 \ CC="${CC}" DEBUG_CFLAGS="" CPU_CFLAGS="${CFLAGS}" OPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS PROMEX OPTIONS_RADIO= PCRE OPTIONS_RADIO_PCRE= DPCRE SPCRE DPCRE_DESC= Link dynamically SPCRE_DESC= Link statically DEVICEATLAS_DESC= DeviceAtlas Device Detection support PROMEX_DESC= Enable Prometheus exporter OPTIONS_DEFAULT= SPCRE OPENSSL PROMEX DPCRE_LIB_DEPENDS= libpcre.so:devel/pcre DPCRE_MAKE_ARGS= USE_PCRE=1 USE_PCRE_JIT=1 SPCRE_LIB_DEPENDS= libpcre.so:devel/pcre SPCRE_MAKE_ARGS= USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1 DEVICEATLAS_LIB_DEPENDS= libda.so:net/deviceatlas-enterprise-c DEVICEATLAS_MAKE_ARGS= USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include PROMEX_MAKE_ARGS= EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" OPENSSL_USES= ssl OPENSSL_MAKE_ARGS= USE_OPENSSL=1 SSL_LIB=${OPENSSLLIB} SSL_INC=${OPENSSLINC} LUA_USES= lua:53 LUA_MAKE_ARGS= USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER} .include .if ${ARCH} == "amd64" || ${ARCH} == "i386" MAKE_ARGS+= USE_REGPARM=1 .endif post-build: cd ${WRKSRC}/contrib/halog && ${MAKE_CMD} ${MAKE_ENV} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_PROGRAM} ${WRKSRC}/contrib/halog/halog ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}) ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) .include diff --git a/net/haproxy22/files/haproxy.in b/net/haproxy22/files/haproxy.in index e9eb2147c412..e13077b01dc3 100644 --- a/net/haproxy22/files/haproxy.in +++ b/net/haproxy22/files/haproxy.in @@ -1,130 +1,131 @@ #!/bin/sh # PROVIDE: haproxy # REQUIRE: DAEMON LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable haproxy: # # haproxy_enable (bool): default: "NO" # Set to "YES" to enable haproxy # haproxy_pidfile (str): default: /var/run/haproxy.pid # Set to the full path of the pid file # haproxy_config (str): default: %%PREFIX%%/etc/haproxy.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 # haproxy_profiles (str): default: empty # Set to space-separated list of profiles: for each profile separate haproxy # process will be spawned, with haproxy-${profile}.conf config file. # You can override default pidfile and config file for each profile with # haproxy_${profile}_config and haproxy_${profile}_pidfile. . /etc/rc.subr name="haproxy" rcvar=haproxy_enable command="%%PREFIX%%/sbin/haproxy" extra_commands="reload configtest hardstop hardreload softreload" reload_cmd="haproxy_reload" hardreload_cmd="haproxy_reload" hardreload_precmd="def_hardreload_option" softreload_cmd="haproxy_reload" softreload_precmd="def_softreload_option" stop_cmd="haproxy_stop" hardstop_cmd="haproxy_stop" hardstop_precmd="def_hardstop_signal" : ${haproxy_enable:="NO"} : ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"} : ${haproxy_socket:="/var/run/${name}/socket"} pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"} def_hardreload_option() { reload_opt="-st" } def_softreload_option() { reload_opt="-x ${haproxy_socket} -sf" } def_hardstop_signal() { sig_stop="TERM" } load_rc_config $name is_valid_profile() { local profile for profile in $haproxy_profiles; do if [ "$profile" = "$1" ]; then return 0 fi done return 1 } if [ -n "$2" ]; then profile=$2 if ! is_valid_profile $profile; then echo "$0: no such profile ($profile) defined in ${name}_profiles." exit 1 fi eval haproxy_config="\${haproxy_${profile}_config:-%%PREFIX%%/etc/haproxy-${profile}.conf}" + eval haproxy_fib="\${haproxy_${profile}_fib:${haproxy_fib}}" eval pidfile="\${haproxy_${profile}_pidfile:-/var/run/haproxy-${profile}.pid}" else if [ "x${haproxy_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${haproxy_profiles}; do echo "===> ${name} profile: ${profile}" %%PREFIX%%/etc/rc.d/haproxy $1 ${profile} retcode="$?" if [ ${retcode} -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi : ${haproxy_flags:="-q -f ${haproxy_config} -p ${pidfile}"} configtest_cmd="$command -c -f $haproxy_config" start_precmd="$command -q -c -f $haproxy_config" required_files=$haproxy_config sig_stop=SIGUSR1 reload_opt="-sf" haproxy_reload() { ${command} -q -c -f ${haproxy_config} if [ $? -ne 0 ]; then err 1 "Error found in ${haproxy_config} - not reloading current process!" fi rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then ${command} ${haproxy_flags} $reload_opt $(cat ${pidfile}) else _run_rc_notrunning return 1 fi } haproxy_stop() { rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then rc_pid=$(cat ${pidfile}) kill -$sig_stop $rc_pid wait_for_pids $rc_pid else _run_rc_notrunning return 1 fi } run_rc_command "$1" diff --git a/net/haproxy24/Makefile b/net/haproxy24/Makefile index cb9991337dd9..5783b1ee4f05 100644 --- a/net/haproxy24/Makefile +++ b/net/haproxy24/Makefile @@ -1,79 +1,80 @@ PORTNAME= haproxy DISTVERSION= 2.4.22 +PORTREVISION= 1 CATEGORIES= net www PKGNAMESUFFIX= 24 MASTER_SITES= http://www.haproxy.org/download/2.4/src/ MAINTAINER= demon@FreeBSD.org COMMENT= Reliable, high performance TCP/HTTP load balancer WWW= https://www.haproxy.org LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi FLAVORS= default lua FLAVOR?= ${FLAVORS:[1]} default_CONFLICTS_INSTALL= haproxy-lua lua_CONFLICTS_INSTALL= haproxy lua_PKGNAMESUFFIX= 24-lua CONFLICTS_INSTALL= haproxy-devel haproxy17 haproxy18 haproxy20 USES= compiler:c++11-lang cpe gmake USE_RC_SUBR= haproxy ALL_TARGET= all admin/halog/halog MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \ USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_ACCEPT4=1 \ CC="${CC}" DEBUG_CFLAGS="" CPU_CFLAGS="${CFLAGS}" \ ${MAKE_ARGS_${ARCH}} MAKE_ARGS_i386= USE_LIBATOMIC= OPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS PROMEX OPTIONS_RADIO= PCRE OPTIONS_RADIO_PCRE= DPCRE SPCRE DPCRE_DESC= Link dynamically SPCRE_DESC= Link statically DEVICEATLAS_DESC= DeviceAtlas Device Detection support PROMEX_DESC= Enable Prometheus exporter OPTIONS_DEFAULT= SPCRE OPENSSL PROMEX DPCRE_LIB_DEPENDS= libpcre.so:devel/pcre DPCRE_MAKE_ARGS= USE_PCRE=1 USE_PCRE_JIT=1 SPCRE_LIB_DEPENDS= libpcre.so:devel/pcre SPCRE_MAKE_ARGS= USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1 DEVICEATLAS_LIB_DEPENDS= libda.so:net/deviceatlas-enterprise-c DEVICEATLAS_MAKE_ARGS= USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include PROMEX_MAKE_ARGS= USE_PROMEX=1 OPENSSL_USES= ssl OPENSSL_MAKE_ARGS= USE_OPENSSL=1 SSL_LIB=${OPENSSLLIB} SSL_INC=${OPENSSLINC} LUA_USES= lua:53 LUA_MAKE_ARGS= USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER} .if ${FLAVOR:U} == lua OPTIONS_DEFAULT+= LUA .endif .include .if ${ARCH} == powerpc MAKE_ARGS+= USE_LIBATOMIC= .endif .include .if ${ARCH} == "amd64" || ${ARCH} == "i386" MAKE_ARGS+= USE_REGPARM=1 .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_PROGRAM} ${WRKSRC}/admin/halog/halog ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}) ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) .include diff --git a/net/haproxy24/files/haproxy.in b/net/haproxy24/files/haproxy.in index e9eb2147c412..e13077b01dc3 100644 --- a/net/haproxy24/files/haproxy.in +++ b/net/haproxy24/files/haproxy.in @@ -1,130 +1,131 @@ #!/bin/sh # PROVIDE: haproxy # REQUIRE: DAEMON LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable haproxy: # # haproxy_enable (bool): default: "NO" # Set to "YES" to enable haproxy # haproxy_pidfile (str): default: /var/run/haproxy.pid # Set to the full path of the pid file # haproxy_config (str): default: %%PREFIX%%/etc/haproxy.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 # haproxy_profiles (str): default: empty # Set to space-separated list of profiles: for each profile separate haproxy # process will be spawned, with haproxy-${profile}.conf config file. # You can override default pidfile and config file for each profile with # haproxy_${profile}_config and haproxy_${profile}_pidfile. . /etc/rc.subr name="haproxy" rcvar=haproxy_enable command="%%PREFIX%%/sbin/haproxy" extra_commands="reload configtest hardstop hardreload softreload" reload_cmd="haproxy_reload" hardreload_cmd="haproxy_reload" hardreload_precmd="def_hardreload_option" softreload_cmd="haproxy_reload" softreload_precmd="def_softreload_option" stop_cmd="haproxy_stop" hardstop_cmd="haproxy_stop" hardstop_precmd="def_hardstop_signal" : ${haproxy_enable:="NO"} : ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"} : ${haproxy_socket:="/var/run/${name}/socket"} pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"} def_hardreload_option() { reload_opt="-st" } def_softreload_option() { reload_opt="-x ${haproxy_socket} -sf" } def_hardstop_signal() { sig_stop="TERM" } load_rc_config $name is_valid_profile() { local profile for profile in $haproxy_profiles; do if [ "$profile" = "$1" ]; then return 0 fi done return 1 } if [ -n "$2" ]; then profile=$2 if ! is_valid_profile $profile; then echo "$0: no such profile ($profile) defined in ${name}_profiles." exit 1 fi eval haproxy_config="\${haproxy_${profile}_config:-%%PREFIX%%/etc/haproxy-${profile}.conf}" + eval haproxy_fib="\${haproxy_${profile}_fib:${haproxy_fib}}" eval pidfile="\${haproxy_${profile}_pidfile:-/var/run/haproxy-${profile}.pid}" else if [ "x${haproxy_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${haproxy_profiles}; do echo "===> ${name} profile: ${profile}" %%PREFIX%%/etc/rc.d/haproxy $1 ${profile} retcode="$?" if [ ${retcode} -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi : ${haproxy_flags:="-q -f ${haproxy_config} -p ${pidfile}"} configtest_cmd="$command -c -f $haproxy_config" start_precmd="$command -q -c -f $haproxy_config" required_files=$haproxy_config sig_stop=SIGUSR1 reload_opt="-sf" haproxy_reload() { ${command} -q -c -f ${haproxy_config} if [ $? -ne 0 ]; then err 1 "Error found in ${haproxy_config} - not reloading current process!" fi rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then ${command} ${haproxy_flags} $reload_opt $(cat ${pidfile}) else _run_rc_notrunning return 1 fi } haproxy_stop() { rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then rc_pid=$(cat ${pidfile}) kill -$sig_stop $rc_pid wait_for_pids $rc_pid else _run_rc_notrunning return 1 fi } run_rc_command "$1" diff --git a/net/haproxy25/Makefile b/net/haproxy25/Makefile index 4f23b2c19e93..d98bb5f84baa 100644 --- a/net/haproxy25/Makefile +++ b/net/haproxy25/Makefile @@ -1,75 +1,76 @@ PORTNAME= haproxy DISTVERSION= 2.5.14 +PORTREVISION= 1 CATEGORIES= net www PKGNAMESUFFIX= 25 MASTER_SITES= http://www.haproxy.org/download/2.5/src/ MAINTAINER= demon@FreeBSD.org COMMENT= Reliable, high performance TCP/HTTP load balancer WWW= https://www.haproxy.org LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi FLAVORS= default lua FLAVOR?= ${FLAVORS:[1]} USES= compiler:c++11-lang cpe gmake USE_RC_SUBR= haproxy default_CONFLICTS_INSTALL= haproxy-lua lua_CONFLICTS_INSTALL= haproxy lua_PKGNAMESUFFIX= 25-lua CONFLICTS_INSTALL= haproxy-devel haproxy17 haproxy18 haproxy20 haproxy22 haproxy23 haproxy24 ALL_TARGET= all admin/halog/halog MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \ USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_ACCEPT4=1 \ CC="${CC}" DEBUG_CFLAGS="" CPU_CFLAGS="${CFLAGS}" \ ${MAKE_ARGS_${ARCH}} MAKE_ARGS_i386= USE_LIBATOMIC= MAKE_ARGS_powerpc= USE_LIBATOMIC= OPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS PROMEX OPTIONS_RADIO= PCRE OPTIONS_RADIO_PCRE= DPCRE DPCRE2 SPCRE SPCRE2 DPCRE_DESC= Link pcre(1) dynamically DPCRE2_DESC= Link pcre2 dynamically SPCRE_DESC= Link pcre(1) statically SPCRE2_DESC= Link pcre2 statically DEVICEATLAS_DESC= DeviceAtlas Device Detection support PROMEX_DESC= Enable Prometheus exporter OPTIONS_DEFAULT= DPCRE2 OPENSSL PROMEX DPCRE_LIB_DEPENDS= libpcre.so:devel/pcre DPCRE_MAKE_ARGS= USE_PCRE=1 USE_PCRE_JIT=1 DPCRE2_LIB_DEPENDS= libpcre2-8.so:devel/pcre2 DPCRE2_MAKE_ARGS= USE_PCRE2=1 USE_PCRE2_JIT=1 SPCRE_BUILD_DEPENDS= ${LOCALBASE}/lib/libpcre.a:devel/pcre SPCRE_MAKE_ARGS= USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1 SPCRE2_BUILD_DEPENDS= ${LOCALBASE}/lib/libpcre2-8.a:devel/pcre2 SPCRE2_MAKE_ARGS= USE_PCRE2=1 USE_STATIC_PCRE2=1 USE_PCRE2_JIT=1 DEVICEATLAS_LIB_DEPENDS= libda.so:net/deviceatlas-enterprise-c DEVICEATLAS_MAKE_ARGS= USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include PROMEX_MAKE_ARGS= USE_PROMEX=1 OPENSSL_USES= ssl OPENSSL_MAKE_ARGS= USE_OPENSSL=1 SSL_LIB=${OPENSSLLIB} SSL_INC=${OPENSSLINC} LUA_USES= lua:53 LUA_MAKE_ARGS= USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER} .if ${FLAVOR:U} == lua OPTIONS_DEFAULT+= LUA .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_PROGRAM} ${WRKSRC}/admin/halog/halog ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}) ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) .include diff --git a/net/haproxy25/files/haproxy.in b/net/haproxy25/files/haproxy.in index e9eb2147c412..e13077b01dc3 100644 --- a/net/haproxy25/files/haproxy.in +++ b/net/haproxy25/files/haproxy.in @@ -1,130 +1,131 @@ #!/bin/sh # PROVIDE: haproxy # REQUIRE: DAEMON LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable haproxy: # # haproxy_enable (bool): default: "NO" # Set to "YES" to enable haproxy # haproxy_pidfile (str): default: /var/run/haproxy.pid # Set to the full path of the pid file # haproxy_config (str): default: %%PREFIX%%/etc/haproxy.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 # haproxy_profiles (str): default: empty # Set to space-separated list of profiles: for each profile separate haproxy # process will be spawned, with haproxy-${profile}.conf config file. # You can override default pidfile and config file for each profile with # haproxy_${profile}_config and haproxy_${profile}_pidfile. . /etc/rc.subr name="haproxy" rcvar=haproxy_enable command="%%PREFIX%%/sbin/haproxy" extra_commands="reload configtest hardstop hardreload softreload" reload_cmd="haproxy_reload" hardreload_cmd="haproxy_reload" hardreload_precmd="def_hardreload_option" softreload_cmd="haproxy_reload" softreload_precmd="def_softreload_option" stop_cmd="haproxy_stop" hardstop_cmd="haproxy_stop" hardstop_precmd="def_hardstop_signal" : ${haproxy_enable:="NO"} : ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"} : ${haproxy_socket:="/var/run/${name}/socket"} pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"} def_hardreload_option() { reload_opt="-st" } def_softreload_option() { reload_opt="-x ${haproxy_socket} -sf" } def_hardstop_signal() { sig_stop="TERM" } load_rc_config $name is_valid_profile() { local profile for profile in $haproxy_profiles; do if [ "$profile" = "$1" ]; then return 0 fi done return 1 } if [ -n "$2" ]; then profile=$2 if ! is_valid_profile $profile; then echo "$0: no such profile ($profile) defined in ${name}_profiles." exit 1 fi eval haproxy_config="\${haproxy_${profile}_config:-%%PREFIX%%/etc/haproxy-${profile}.conf}" + eval haproxy_fib="\${haproxy_${profile}_fib:${haproxy_fib}}" eval pidfile="\${haproxy_${profile}_pidfile:-/var/run/haproxy-${profile}.pid}" else if [ "x${haproxy_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${haproxy_profiles}; do echo "===> ${name} profile: ${profile}" %%PREFIX%%/etc/rc.d/haproxy $1 ${profile} retcode="$?" if [ ${retcode} -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi : ${haproxy_flags:="-q -f ${haproxy_config} -p ${pidfile}"} configtest_cmd="$command -c -f $haproxy_config" start_precmd="$command -q -c -f $haproxy_config" required_files=$haproxy_config sig_stop=SIGUSR1 reload_opt="-sf" haproxy_reload() { ${command} -q -c -f ${haproxy_config} if [ $? -ne 0 ]; then err 1 "Error found in ${haproxy_config} - not reloading current process!" fi rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then ${command} ${haproxy_flags} $reload_opt $(cat ${pidfile}) else _run_rc_notrunning return 1 fi } haproxy_stop() { rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then rc_pid=$(cat ${pidfile}) kill -$sig_stop $rc_pid wait_for_pids $rc_pid else _run_rc_notrunning return 1 fi } run_rc_command "$1" diff --git a/net/haproxy26/Makefile b/net/haproxy26/Makefile index 5804d3f3da0f..33f8f3d105ab 100644 --- a/net/haproxy26/Makefile +++ b/net/haproxy26/Makefile @@ -1,75 +1,76 @@ PORTNAME= haproxy DISTVERSION= 2.6.13 +PORTREVISION= 1 CATEGORIES= net www PKGNAMESUFFIX= 26 MASTER_SITES= http://www.haproxy.org/download/2.6/src/ MAINTAINER= demon@FreeBSD.org COMMENT= Reliable, high performance TCP/HTTP load balancer WWW= https://www.haproxy.org LICENSE= GPLv2 LGPL21 LICENSE_COMB= multi FLAVORS= default lua FLAVOR?= ${FLAVORS:[1]} USES= compiler:c++11-lang cpe gmake USE_RC_SUBR= haproxy default_CONFLICTS_INSTALL= haproxy-lua lua_CONFLICTS_INSTALL= haproxy lua_PKGNAMESUFFIX= 26-lua CONFLICTS_INSTALL= haproxy haproxy-devel haproxy17 haproxy18 haproxy20 haproxy22 haproxy23 haproxy24 haproxy25 ALL_TARGET= all admin/halog/halog MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \ USE_ZLIB=1 USE_CPU_AFFINITY=1 USE_ACCEPT4=1 \ CC="${CC}" DEBUG_CFLAGS="" CPU_CFLAGS="${CFLAGS}" \ ${MAKE_ARGS_${ARCH}} MAKE_ARGS_i386= USE_LIBATOMIC= MAKE_ARGS_powerpc= USE_LIBATOMIC= OPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS PROMEX OPTIONS_RADIO= PCRE OPTIONS_RADIO_PCRE= DPCRE DPCRE2 SPCRE SPCRE2 DPCRE_DESC= Link pcre(1) dynamically DPCRE2_DESC= Link pcre2 dynamically SPCRE_DESC= Link pcre(1) statically SPCRE2_DESC= Link pcre2 statically DEVICEATLAS_DESC= DeviceAtlas Device Detection support PROMEX_DESC= Enable Prometheus exporter OPTIONS_DEFAULT= DPCRE2 OPENSSL PROMEX DPCRE_LIB_DEPENDS= libpcre.so:devel/pcre DPCRE_MAKE_ARGS= USE_PCRE=1 USE_PCRE_JIT=1 DPCRE2_LIB_DEPENDS= libpcre2-8.so:devel/pcre2 DPCRE2_MAKE_ARGS= USE_PCRE2=1 USE_PCRE2_JIT=1 SPCRE_BUILD_DEPENDS= ${LOCALBASE}/lib/libpcre.a:devel/pcre SPCRE_MAKE_ARGS= USE_PCRE=1 USE_STATIC_PCRE=1 USE_PCRE_JIT=1 SPCRE2_BUILD_DEPENDS= ${LOCALBASE}/lib/libpcre2-8.a:devel/pcre2 SPCRE2_MAKE_ARGS= USE_PCRE2=1 USE_STATIC_PCRE2=1 USE_PCRE2_JIT=1 DEVICEATLAS_LIB_DEPENDS= libda.so:net/deviceatlas-enterprise-c DEVICEATLAS_MAKE_ARGS= USE_DEVICEATLAS=1 DEVICEATLAS_LIB=${LOCALBASE}/lib DEVICEATLAS_INC=${LOCALBASE}/include PROMEX_MAKE_ARGS= USE_PROMEX=1 OPENSSL_USES= ssl OPENSSL_MAKE_ARGS= USE_OPENSSL=1 SSL_LIB=${OPENSSLLIB} SSL_INC=${OPENSSLINC} LUA_USES= lua:53 LUA_MAKE_ARGS= USE_LUA=1 LUA_INC=${LUA_INCDIR} LUA_LIB=${LUA_LIBDIR} LUA_LIB_NAME=lua-${LUA_VER} .if ${FLAVOR:U} == lua OPTIONS_DEFAULT+= LUA .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/haproxy ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_PROGRAM} ${WRKSRC}/admin/halog/halog ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_MAN} ${WRKSRC}/doc/haproxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}) ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) .include diff --git a/net/haproxy26/files/haproxy.in b/net/haproxy26/files/haproxy.in index e9eb2147c412..e13077b01dc3 100644 --- a/net/haproxy26/files/haproxy.in +++ b/net/haproxy26/files/haproxy.in @@ -1,130 +1,131 @@ #!/bin/sh # PROVIDE: haproxy # REQUIRE: DAEMON LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable haproxy: # # haproxy_enable (bool): default: "NO" # Set to "YES" to enable haproxy # haproxy_pidfile (str): default: /var/run/haproxy.pid # Set to the full path of the pid file # haproxy_config (str): default: %%PREFIX%%/etc/haproxy.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 # haproxy_profiles (str): default: empty # Set to space-separated list of profiles: for each profile separate haproxy # process will be spawned, with haproxy-${profile}.conf config file. # You can override default pidfile and config file for each profile with # haproxy_${profile}_config and haproxy_${profile}_pidfile. . /etc/rc.subr name="haproxy" rcvar=haproxy_enable command="%%PREFIX%%/sbin/haproxy" extra_commands="reload configtest hardstop hardreload softreload" reload_cmd="haproxy_reload" hardreload_cmd="haproxy_reload" hardreload_precmd="def_hardreload_option" softreload_cmd="haproxy_reload" softreload_precmd="def_softreload_option" stop_cmd="haproxy_stop" hardstop_cmd="haproxy_stop" hardstop_precmd="def_hardstop_signal" : ${haproxy_enable:="NO"} : ${haproxy_config:="%%PREFIX%%/etc/${name}.conf"} : ${haproxy_socket:="/var/run/${name}/socket"} pidfile=${haproxy_pidfile:-"/var/run/haproxy.pid"} def_hardreload_option() { reload_opt="-st" } def_softreload_option() { reload_opt="-x ${haproxy_socket} -sf" } def_hardstop_signal() { sig_stop="TERM" } load_rc_config $name is_valid_profile() { local profile for profile in $haproxy_profiles; do if [ "$profile" = "$1" ]; then return 0 fi done return 1 } if [ -n "$2" ]; then profile=$2 if ! is_valid_profile $profile; then echo "$0: no such profile ($profile) defined in ${name}_profiles." exit 1 fi eval haproxy_config="\${haproxy_${profile}_config:-%%PREFIX%%/etc/haproxy-${profile}.conf}" + eval haproxy_fib="\${haproxy_${profile}_fib:${haproxy_fib}}" eval pidfile="\${haproxy_${profile}_pidfile:-/var/run/haproxy-${profile}.pid}" else if [ "x${haproxy_profiles}" != "x" -a "x$1" != "x" ]; then for profile in ${haproxy_profiles}; do echo "===> ${name} profile: ${profile}" %%PREFIX%%/etc/rc.d/haproxy $1 ${profile} retcode="$?" if [ ${retcode} -ne 0 ]; then failed="${profile} (${retcode}) ${failed:-}" else success="${profile} ${success:-}" fi done exit 0 fi fi : ${haproxy_flags:="-q -f ${haproxy_config} -p ${pidfile}"} configtest_cmd="$command -c -f $haproxy_config" start_precmd="$command -q -c -f $haproxy_config" required_files=$haproxy_config sig_stop=SIGUSR1 reload_opt="-sf" haproxy_reload() { ${command} -q -c -f ${haproxy_config} if [ $? -ne 0 ]; then err 1 "Error found in ${haproxy_config} - not reloading current process!" fi rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then ${command} ${haproxy_flags} $reload_opt $(cat ${pidfile}) else _run_rc_notrunning return 1 fi } haproxy_stop() { rc_pid=$(check_pidfile ${pidfile} ${command}) if [ $rc_pid ]; then rc_pid=$(cat ${pidfile}) kill -$sig_stop $rc_pid wait_for_pids $rc_pid else _run_rc_notrunning return 1 fi } run_rc_command "$1"