Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Nov 2018 15:09:20 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r484400 - in head/databases/p5-Bucardo: . files
Message-ID:  <201811071509.wA7F9K0d041041@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Wed Nov  7 15:09:20 2018
New Revision: 484400
URL: https://svnweb.freebsd.org/changeset/ports/484400

Log:
  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.

Added:
  head/databases/p5-Bucardo/files/bucardo.in   (contents, props changed)
Deleted:
  head/databases/p5-Bucardo/files/patch-dist__bucardo.rc
Modified:
  head/databases/p5-Bucardo/Makefile   (contents, props changed)
  head/databases/p5-Bucardo/distinfo   (contents, props changed)
  head/databases/p5-Bucardo/pkg-plist   (contents, props changed)

Modified: head/databases/p5-Bucardo/Makefile
==============================================================================
--- head/databases/p5-Bucardo/Makefile	Wed Nov  7 14:59:34 2018	(r484399)
+++ head/databases/p5-Bucardo/Makefile	Wed Nov  7 15:09:20 2018	(r484400)
@@ -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>

Modified: head/databases/p5-Bucardo/distinfo
==============================================================================
--- head/databases/p5-Bucardo/distinfo	Wed Nov  7 14:59:34 2018	(r484399)
+++ head/databases/p5-Bucardo/distinfo	Wed Nov  7 15:09:20 2018	(r484400)
@@ -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

Added: head/databases/p5-Bucardo/files/bucardo.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/p5-Bucardo/files/bucardo.in	Wed Nov  7 15:09:20 2018	(r484400)
@@ -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 "$@"
+

Modified: head/databases/p5-Bucardo/pkg-plist
==============================================================================
--- head/databases/p5-Bucardo/pkg-plist	Wed Nov  7 14:59:34 2018	(r484399)
+++ head/databases/p5-Bucardo/pkg-plist	Wed Nov  7 15:09:20 2018	(r484400)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811071509.wA7F9K0d041041>