diff options
author | zi <zi@FreeBSD.org> | 2011-12-24 21:35:30 +0800 |
---|---|---|
committer | zi <zi@FreeBSD.org> | 2011-12-24 21:35:30 +0800 |
commit | 639f2649c9b1cbcc200e155cdcbe8b4742428bae (patch) | |
tree | eac85135aeb10add4189ddf05169cba30c74a2c4 /databases | |
parent | 4ceb686752fc1d0a8f30973c2de145afc0b0b300 (diff) | |
download | freebsd-ports-gnome-639f2649c9b1cbcc200e155cdcbe8b4742428bae.tar.gz freebsd-ports-gnome-639f2649c9b1cbcc200e155cdcbe8b4742428bae.tar.zst freebsd-ports-gnome-639f2649c9b1cbcc200e155cdcbe8b4742428bae.zip |
- Update to 1.4
- Honor custom LOCALBASE/PREFIX
PR: ports/163243
Submitted by: Frank Wall <fw@moov.de> (maintainer)
Diffstat (limited to 'databases')
-rw-r--r-- | databases/autobackupmysql/Makefile | 10 | ||||
-rw-r--r-- | databases/autobackupmysql/distinfo | 4 | ||||
-rw-r--r-- | databases/autobackupmysql/files/patch-autobackupmysql.sh | 34 |
3 files changed, 27 insertions, 21 deletions
diff --git a/databases/autobackupmysql/Makefile b/databases/autobackupmysql/Makefile index 876ae1989956..2ff4eb4256ad 100644 --- a/databases/autobackupmysql/Makefile +++ b/databases/autobackupmysql/Makefile @@ -6,7 +6,7 @@ # PORTNAME= autobackupmysql -PORTVERSION= 1.1 +PORTVERSION= 1.4 CATEGORIES= databases MASTER_SITES= SF/${PORTNAME} DISTNAME= ${PORTNAME} @@ -17,10 +17,6 @@ COMMENT= Make daily, weekly and monthly backups of your MySQL databases RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash -.if defined(WITH_OLDBASH) -RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash3 -.endif - NO_BUILD= yes PLIST_FILES= sbin/autobackupmysql.sh @@ -28,6 +24,10 @@ do-extract: ${MKDIR} ${WRKSRC} ${CP} ${DISTDIR}/${DISTFILES} ${WRKSRC} +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/autobackupmysql.sh + @${REINPLACE_CMD} -e 's|${LOCALBASE}/etc|${PREFIX}/etc|g' ${WRKSRC}/autobackupmysql.sh + do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.sh ${PREFIX}/sbin diff --git a/databases/autobackupmysql/distinfo b/databases/autobackupmysql/distinfo index 82e9d2c2ee0d..3c8b95940a41 100644 --- a/databases/autobackupmysql/distinfo +++ b/databases/autobackupmysql/distinfo @@ -1,2 +1,2 @@ -SHA256 (autobackupmysql.sh) = 986b5dad34f47a04e1ddb3d03eab3a830e27f3bfb7245ec2154d168a25f375ce -SIZE (autobackupmysql.sh) = 22011 +SHA256 (autobackupmysql.sh) = 0bf9c0d074dc7484a966a4b0208f66f7b9dbcdb1f7f66842fbafcf234df5bff6 +SIZE (autobackupmysql.sh) = 22746 diff --git a/databases/autobackupmysql/files/patch-autobackupmysql.sh b/databases/autobackupmysql/files/patch-autobackupmysql.sh index e9b2ba369219..60e732cbcb8f 100644 --- a/databases/autobackupmysql/files/patch-autobackupmysql.sh +++ b/databases/autobackupmysql/files/patch-autobackupmysql.sh @@ -1,20 +1,26 @@ ---- autobackupmysql.sh.orig 2009-12-21 15:25:29.000000000 +0100 -+++ autobackupmysql.sh 2009-12-21 16:07:01.000000000 +0100 +--- autobackupmysql.sh.orig 2009-12-18 13:23:34.000000000 +0100 ++++ autobackupmysql.sh 2011-12-13 13:18:11.000000000 +0100 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/local/bin/bash # # Automatic MySQL Backup Script # VER. 1.1 - http://sourceforge.net/projects/autobackupmysql/ -@@ -30,8 +30,8 @@ - # Check configuration files - if [ -f "autobackupmysql.conf" ] ; then - source "autobackupmysql.conf" --elif [ - f "/etc/autobackupmysql.conf" ] ; then -- source "/etc/autobackupmysql.conf" -+elif [ -f "/usr/local/etc/autobackupmysql.conf" ] ; then -+ source "/usr/local/etc/autobackupmysql.conf" - else - # Username to access the MySQL server e.g. dbuser - USERNAME='dbuser' - +@@ -292,6 +292,7 @@ + LOGERR=$BACKUPDIR/ERRORS_$DBHOST-`date +%N`.log # Logfile Name + BACKUPFILES="" + OPT="--quote-names --opt" # OPT string for use with mysqldump ( see man mysqldump ) ++UNAME_S="`uname -s | tr "[:upper:]" "[:lower:]"`" # identify operating system + + # Add --compress mysqldump option to $OPT + if [ "$COMMCOMP" = "yes" ]; +@@ -440,7 +441,8 @@ + # If DBs are excluded + for exclude in $DBEXCLUDE + do +- DBNAMES=`echo $DBNAMES | sed "s/\b$exclude\b//g"` ++ [ "$UNAME_S" = "linux" ] && DBNAMES=`echo $DBNAMES | sed "s/\b$exclude\b//g"` ++ [ "$UNAME_S" = "freebsd" ] && DBNAMES=`echo $DBNAMES | sed "s/[[:<:]]$exclude[[:>:]]//g"` + done + + MDBNAMES=$DBNAMES |