mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
- Update to 1.1.28
- RCng'ify startup script - small plist fix if NOPORTDOCS is defined - Add an entry in UPDATING - move configuration example to ${EXAMPLESDIR}.
This commit is contained in:
parent
5ae350cd7e
commit
c62a21e358
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=111077
11 changed files with 146 additions and 58 deletions
6
UPDATING
6
UPDATING
|
@ -6,6 +6,12 @@ You should get into the habit of checking this file for changes each
|
|||
time you update your ports collection, before attempting any port
|
||||
upgrades.
|
||||
|
||||
20040608:
|
||||
AFFECTS: users of net/haproxy
|
||||
|
||||
The haproxy port must now be enabled / disabled and configured in
|
||||
rc.conf. See the pkg-message or script for details.
|
||||
|
||||
20040605:
|
||||
AFFECTS: users of www/apache2
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= haproxy
|
||||
PORTVERSION= 1.1.27
|
||||
PORTVERSION= 1.1.28
|
||||
CATEGORIES= net www
|
||||
MASTER_SITES= http://w.ods.org/tools/haproxy/src/ \
|
||||
http://w.ods.org/tools/haproxy/src/old/
|
||||
|
@ -15,6 +15,8 @@ MAINTAINER= clement@FreeBSD.org
|
|||
COMMENT= High-performance and highly-robust TCP/HTTP load balancer
|
||||
|
||||
USE_REINPLACE= yes
|
||||
USE_RC_SUBR= yes
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
||||
|
||||
STATS_INTERVAL?= 0
|
||||
CFLAGS+= -DSTATTIME=${STATS_INTERVAL}
|
||||
|
@ -41,19 +43,27 @@ pre-fetch:
|
|||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's!localtime(!localtime((time_t *)!' ${WRKSRC}/haproxy.c
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/haproxy.sh > ${WRKDIR}/haproxy.sh
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} ${PORTNAME}.c -o ${PORTNAME}
|
||||
@cd ${WRKSRC} && \
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${PORTNAME}.c -o ${PORTNAME}
|
||||
|
||||
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
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/haproxy.sh \
|
||||
${PREFIX}/etc/rc.d/haproxy.sh
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${MKDIR} ${EXAMPLESDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg \
|
||||
${EXAMPLESDIR}/haproxy.cfg
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
MD5 (haproxy-1.1.27.tar.gz) = 8379ebfc91a5fbf1f49ca65e36b460af
|
||||
SIZE (haproxy-1.1.27.tar.gz) = 90455
|
||||
MD5 (haproxy-1.1.28.tar.gz) = 193ff4d73dfc503bf6e7b8e4cd825e5e
|
||||
SIZE (haproxy-1.1.28.tar.gz) = 97764
|
||||
|
|
|
@ -1,22 +1,50 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
# PROVIDE: haproxy
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/haproxy ] && \
|
||||
[ -r ${PREFIX}/etc/haproxy.cfg ] && \
|
||||
${PREFIX}/sbin/haproxy -f ${PREFIX}/etc/haproxy.cfg && \
|
||||
echo -n ' haproxy'
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
. %%RC_SUBR%%
|
||||
|
||||
;;
|
||||
stop)
|
||||
killall haproxy && echo -n ' haproxy'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
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}"
|
||||
[ -z "$haproxylimits_enable" ] && haproxylimits_enable="NO"
|
||||
[ -z "$haproxylimits_args" ] && haproxylimits_args="-e -C daemon"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
checkyesno haproxylimits_enable && \
|
||||
start_precmd="eval `/usr/bin/limits ${haproxylimits_args}` 2>/dev/null"
|
||||
|
||||
sig_gracefulstop=SIGUSR1
|
||||
|
||||
haproxy_gracefulstop() {
|
||||
echo "Gracefully shutdown haproxy ($rc_pid)"
|
||||
kill -${sig_gracefulstop} ${rc_pid}
|
||||
}
|
||||
|
||||
extra_commands="gracefulstop"
|
||||
run_rc_command "$1"
|
||||
|
|
3
net/haproxy-devel/pkg-message
Normal file
3
net/haproxy-devel/pkg-message
Normal file
|
@ -0,0 +1,3 @@
|
|||
===> BE CAREFULL HOW TO BOOT on 1.1.28 or after:
|
||||
To run haproxy from startup, add haproxy_enable="YES" in your
|
||||
/etc/rc.conf.
|
|
@ -1,6 +1,6 @@
|
|||
sbin/haproxy
|
||||
etc/haproxy.cfg.sample
|
||||
etc/rc.d/haproxy.sh.sample
|
||||
etc/rc.d/haproxy.sh
|
||||
%%PORTDOCS%%%%DOCSDIR%%/haproxy-en.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/haproxy-fr.txt
|
||||
@dirrm %%DOCSDIR%%
|
||||
%%PORTDOCS%%%%EXAMPLESDIR%%/haproxy.cfg
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= haproxy
|
||||
PORTVERSION= 1.1.27
|
||||
PORTVERSION= 1.1.28
|
||||
CATEGORIES= net www
|
||||
MASTER_SITES= http://w.ods.org/tools/haproxy/src/ \
|
||||
http://w.ods.org/tools/haproxy/src/old/
|
||||
|
@ -15,6 +15,8 @@ MAINTAINER= clement@FreeBSD.org
|
|||
COMMENT= High-performance and highly-robust TCP/HTTP load balancer
|
||||
|
||||
USE_REINPLACE= yes
|
||||
USE_RC_SUBR= yes
|
||||
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
||||
|
||||
STATS_INTERVAL?= 0
|
||||
CFLAGS+= -DSTATTIME=${STATS_INTERVAL}
|
||||
|
@ -41,19 +43,27 @@ pre-fetch:
|
|||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's!localtime(!localtime((time_t *)!' ${WRKSRC}/haproxy.c
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/haproxy.sh > ${WRKDIR}/haproxy.sh
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} ${PORTNAME}.c -o ${PORTNAME}
|
||||
@cd ${WRKSRC} && \
|
||||
${CC} ${CFLAGS} ${LDFLAGS} ${PORTNAME}.c -o ${PORTNAME}
|
||||
|
||||
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
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/haproxy.sh \
|
||||
${PREFIX}/etc/rc.d/haproxy.sh
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${MKDIR} ${EXAMPLESDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg \
|
||||
${EXAMPLESDIR}/haproxy.cfg
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
MD5 (haproxy-1.1.27.tar.gz) = 8379ebfc91a5fbf1f49ca65e36b460af
|
||||
SIZE (haproxy-1.1.27.tar.gz) = 90455
|
||||
MD5 (haproxy-1.1.28.tar.gz) = 193ff4d73dfc503bf6e7b8e4cd825e5e
|
||||
SIZE (haproxy-1.1.28.tar.gz) = 97764
|
||||
|
|
|
@ -1,22 +1,50 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
||||
echo "$0: Cannot determine the PREFIX" >&2
|
||||
exit 1
|
||||
fi
|
||||
# PROVIDE: haproxy
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x ${PREFIX}/sbin/haproxy ] && \
|
||||
[ -r ${PREFIX}/etc/haproxy.cfg ] && \
|
||||
${PREFIX}/sbin/haproxy -f ${PREFIX}/etc/haproxy.cfg && \
|
||||
echo -n ' haproxy'
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
. %%RC_SUBR%%
|
||||
|
||||
;;
|
||||
stop)
|
||||
killall haproxy && echo -n ' haproxy'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
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}"
|
||||
[ -z "$haproxylimits_enable" ] && haproxylimits_enable="NO"
|
||||
[ -z "$haproxylimits_args" ] && haproxylimits_args="-e -C daemon"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
checkyesno haproxylimits_enable && \
|
||||
start_precmd="eval `/usr/bin/limits ${haproxylimits_args}` 2>/dev/null"
|
||||
|
||||
sig_gracefulstop=SIGUSR1
|
||||
|
||||
haproxy_gracefulstop() {
|
||||
echo "Gracefully shutdown haproxy ($rc_pid)"
|
||||
kill -${sig_gracefulstop} ${rc_pid}
|
||||
}
|
||||
|
||||
extra_commands="gracefulstop"
|
||||
run_rc_command "$1"
|
||||
|
|
3
net/haproxy/pkg-message
Normal file
3
net/haproxy/pkg-message
Normal file
|
@ -0,0 +1,3 @@
|
|||
===> BE CAREFULL HOW TO BOOT on 1.1.28 or after:
|
||||
To run haproxy from startup, add haproxy_enable="YES" in your
|
||||
/etc/rc.conf.
|
|
@ -1,6 +1,6 @@
|
|||
sbin/haproxy
|
||||
etc/haproxy.cfg.sample
|
||||
etc/rc.d/haproxy.sh.sample
|
||||
etc/rc.d/haproxy.sh
|
||||
%%PORTDOCS%%%%DOCSDIR%%/haproxy-en.txt
|
||||
%%PORTDOCS%%%%DOCSDIR%%/haproxy-fr.txt
|
||||
@dirrm %%DOCSDIR%%
|
||||
%%PORTDOCS%%%%EXAMPLESDIR%%/haproxy.cfg
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
|
|
Loading…
Add table
Reference in a new issue