aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--databases/p5-Bucardo/Makefile8
-rw-r--r--databases/p5-Bucardo/distinfo5
-rw-r--r--databases/p5-Bucardo/files/bucardo.in106
-rw-r--r--databases/p5-Bucardo/files/patch-dist__bucardo.rc15
-rw-r--r--databases/p5-Bucardo/pkg-plist8
5 files changed, 120 insertions, 22 deletions
diff --git a/databases/p5-Bucardo/Makefile b/databases/p5-Bucardo/Makefile
index bbfe5ebc4008..a9f504f02e66 100644
--- a/databases/p5-Bucardo/Makefile
+++ b/databases/p5-Bucardo/Makefile
@@ -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>
diff --git a/databases/p5-Bucardo/distinfo b/databases/p5-Bucardo/distinfo
index 4759eaa9cab3..d0297e8fd04f 100644
--- a/databases/p5-Bucardo/distinfo
+++ b/databases/p5-Bucardo/distinfo
@@ -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
diff --git a/databases/p5-Bucardo/files/bucardo.in b/databases/p5-Bucardo/files/bucardo.in
new file mode 100644
index 000000000000..137004eec74f
--- /dev/null
+++ b/databases/p5-Bucardo/files/bucardo.in
@@ -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 "$@"
+
diff --git a/databases/p5-Bucardo/files/patch-dist__bucardo.rc b/databases/p5-Bucardo/files/patch-dist__bucardo.rc
deleted file mode 100644
index 9618f0d08a64..000000000000
--- a/databases/p5-Bucardo/files/patch-dist__bucardo.rc
+++ /dev/null
@@ -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]"
diff --git a/databases/p5-Bucardo/pkg-plist b/databases/p5-Bucardo/pkg-plist
index 06dc7f42db5c..38d2d0f721b5 100644
--- a/databases/p5-Bucardo/pkg-plist
+++ b/databases/p5-Bucardo/pkg-plist
@@ -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