From c54635d5954c80bf7006d7c1a26bb19a25e27075 Mon Sep 17 00:00:00 2001 From: Dirk Froemberg Date: Thu, 30 Jan 2003 10:01:56 +0000 Subject: [PATCH] - backup config files - fix ftp sites PR: ports/47418 Submitted by: Thierry Thomas --- mail/imp3/Makefile | 10 +++++++--- mail/imp3/pkg-deinstall | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 mail/imp3/pkg-deinstall diff --git a/mail/imp3/Makefile b/mail/imp3/Makefile index 4345211cea9d..9c3609a57c3f 100644 --- a/mail/imp3/Makefile +++ b/mail/imp3/Makefile @@ -7,10 +7,14 @@ PORTNAME= imp PORTVERSION= 3.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail www -MASTER_SITES= ftp://ftp.horde.org/pub/imp/tarballs/%SUBDIR%/ -MASTER_SITE_SUBDIR= . old +MASTER_SITES= ftp://ftp.horde.org/pub/imp/ \ + ftp://ftp.au.horde.org/pub/horde/imp/ \ + ftp://ftp.es.horde.org/pub/imp/ \ + ftp://ftp.it.horde.org/pub/mirror/horde.org/imp/ \ + ftp://ftp.nl.horde.org/mirror/horde-ftp/pub/imp/ \ + ftp://ftp.pt.horde.org/pub/horde-ftp/imp/ MAINTAINER= thierry@pompo.net diff --git a/mail/imp3/pkg-deinstall b/mail/imp3/pkg-deinstall new file mode 100644 index 000000000000..cd0aa1e6c6c5 --- /dev/null +++ b/mail/imp3/pkg-deinstall @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Backup IMP config files, if needed. + +if [ x$2 != xDEINSTALL ]; then + exit +fi + +if [ -z "${PACKAGE_BUILDING}" ]; then + for cf in `ls ${PKG_PREFIX}/www/horde/imp/config/*php ${PKG_PREFIX}/www/horde/imp/config/*txt`; do + diff -bBqw $cf $cf.dist >/dev/null 2>&1 + case $? in + 0) # original config file, will be deleted by pkg-plist + ;; + 1) # config file has been updated, must be backuped + cp -p $cf $cf.previous + echo "===> Backing-up..." + echo "---> $cf has been saved ***" + echo "---> as $cf.previous ***" + ;; + *) # not found? + ;; + esac + done +fi