Update to 5.5.0

The rc script is no longer provided, so integrate it here.  Also install
some extra scripts to help with admin tasks.
This commit is contained in:
Mathieu Arnold 2018-11-07 15:09:20 +00:00
parent 8538cec21a
commit 15df501f08
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=484400
5 changed files with 120 additions and 22 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= Bucardo
PORTVERSION= 5.4.1
PORTVERSION= 5.5.0
CATEGORIES= databases perl5
MASTER_SITES= http://bucardo.org/downloads/ LOCAL/mat/${PORTNAME}
PKGNAMEPREFIX= p5-
@ -22,14 +22,16 @@ RUN_DEPENDS= p5-DBI>=1.51:databases/p5-DBI \
USES= perl5
USE_PERL5= configure
USE_RC_SUBR= bucardo
post-patch:
@${REINPLACE_CMD} 's/INSTALL_BASE/DESTDIR/;s/bucardo.1pm/bucardo.1/' \
${WRKSRC}/Makefile.PL
@${REINPLACE_CMD} 's=/usr/local=${PREFIX}=' ${WRKSRC}/Makefile.PL \
${WRKSRC}/bucardo ${WRKSRC}/dist/bucardo.rc
${WRKSRC}/bucardo
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/dist/bucardo.rc ${STAGEDIR}${PREFIX}/etc/rc.d/bucardo
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${STAGEDIR}${DATADIR}
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (Bucardo-5.4.1.tar.gz) = 0f080d75a7dca98c12f4d01463ba01e461c7c25c8daa383aca94202efd5d13dd
SIZE (Bucardo-5.4.1.tar.gz) = 327848
TIMESTAMP = 1541601827
SHA256 (Bucardo-5.5.0.tar.gz) = 14ca09a7394fd63029b583a01e2d04b438d4860af2dac109c6a3352e517abb2d
SIZE (Bucardo-5.5.0.tar.gz) = 331998

View File

@ -0,0 +1,106 @@
#!/bin/sh
# PROVIDE: bucardo
# REQUIRE: LOGIN postgresql
# KEYWORD: shutdown
#
# bucardo_enable="YES"
# bucardo_flags="--dbuser bucardo --dbname bucardo"
#
#
. /etc/rc.subr
name="bucardo"
rcvar="bucardo_enable"
command="%%PREFIX%%/bin/${name}"
load_rc_config $name
bucardo_enable=${bucardo_enable:-"NO"}
bucardo_flags=${bucardo_flags:-"--dbuser bucardo --dbname bucardo"}
rc_usage="start|stop|reload|restart|status|kick [sync_name]"
extra_commands="reload kick"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
reload_cmd="${name}_reload"
restart_cmd="${name}_restart"
kick_cmd="${name}_kick"
status_cmd="${name}_status"
bucardo_start()
{
if [ -x ${command} ]; then
${command} ${bucardo_flags} start "Started by rc script."
else
echo "${command} not found or not executable!"
exit 1
fi
}
bucardo_stop()
{
if [ -x ${command} ]; then
${command} ${bucardo_flags} stop "Stopped by rc script."
else
echo "${command} not found or not executable!"
exit 1
fi
}
bucardo_reload()
{
if [ -x ${command} ]; then
${command} ${bucardo_flags} reload_config
else
echo "${command} not found or not executable!"
exit 1
fi
}
bucardo_restart()
{
if [ -x ${command} ]; then
${command} ${bucardo_flags} stop "Restarting: Stopped by rc script"
${command} ${bucardo_flags} start "Restarting: Started by rc script"
else
echo "${command} not found or not executable!"
exit 1
fi
}
bucardo_kick()
{
if [ -x ${command} ]; then
if [ $# -gt 0 ]; then
${command} ${bucardo_flags} kick $*
else
echo "Specifiy sync name to kick off"
exit 1
fi
else
echo "${command} not found or not executable!"
exit 1
fi
}
bucardo_status()
{
if [ -x ${command} ]; then
if [ $# -gt 0 ]; then
${command} ${bucardo_flags} status $*
else
${command} ${bucardo_flags} status
fi
else
echo "${command} not found or not executable!"
exit 1
fi
}
load_rc_config $name
run_rc_command "$@"

View File

@ -1,15 +0,0 @@
--- dist/bucardo.rc.orig 2014-11-07 17:55:46 UTC
+++ dist/bucardo.rc
@@ -11,10 +11,11 @@
. /etc/rc.subr
name="bucardo"
-rcvar=`set_rcvar`
+rcvar="bucardo_enable"
command="/usr/local/bin/${name}"
load_rc_config $name
+bucardo_enable=${bucardo_enable:-"NO"}
bucardo_flags=${bucardo_flags:-"--dbuser bucardo --dbname bucardo"}
rc_usage="start|stop|reload|restart|status|kick [sync_name]"

View File

@ -1,6 +1,10 @@
bin/bucardo
etc/rc.d/bucardo
%%PERL5_MAN3%%/Bucardo.3.gz
%%SITE_PERL%%/Bucardo.pm
%%PERL5_MAN1%%/bucardo.1.gz
%%PERL5_MAN3%%/Bucardo.3.gz
%%DATADIR%%/README
%%DATADIR%%/bucardo-report
%%DATADIR%%/bucardo_rrd
%%DATADIR%%/check_bucardo_sync
%%DATADIR%%/slony_migrator.pl
share/bucardo/bucardo.schema