aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2010-11-07 02:55:37 +0800
committerpav <pav@FreeBSD.org>2010-11-07 02:55:37 +0800
commitcd8c085e32636fa342fda42e7b13f136051b8b8b (patch)
tree4a14d5700dc3d86e78a3603f4fc27396ee222de1
parenta42a15e00c01332322b0f158918fd1ff0ee30db7 (diff)
downloadfreebsd-ports-gnome-cd8c085e32636fa342fda42e7b13f136051b8b8b.tar.gz
freebsd-ports-gnome-cd8c085e32636fa342fda42e7b13f136051b8b8b.tar.zst
freebsd-ports-gnome-cd8c085e32636fa342fda42e7b13f136051b8b8b.zip
- Make this port play nice with leftover config files
PR: ports/150881 Submitted by: Alexander Moisseev <moiseev@mezonplus.ru> (maintainer)
-rw-r--r--sysutils/backuppc/Makefile14
-rw-r--r--sysutils/backuppc/distinfo1
-rw-r--r--sysutils/backuppc/pkg-plist8
3 files changed, 16 insertions, 7 deletions
diff --git a/sysutils/backuppc/Makefile b/sysutils/backuppc/Makefile
index 036166c0c407..611b271e6c0b 100644
--- a/sysutils/backuppc/Makefile
+++ b/sysutils/backuppc/Makefile
@@ -7,7 +7,7 @@
PORTNAME= backuppc
PORTVERSION= 3.2.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= SF
MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTVERSION}
@@ -17,7 +17,6 @@ MAINTAINER= moiseev@mezonplus.ru
COMMENT= System for backing PCs and laptops to a server
NO_BUILD= yes
-NO_PACKAGE= Complex site specific configuration for config.pl required
USE_PERL5= 5.8.0+
USE_RC_SUBR= backuppc
@@ -63,6 +62,7 @@ RUN_DEPENDS+= ${SITE_PERL}/XML/RSS.pm:${PORTSDIR}/textproc/p5-XML-RSS
post-patch:
@${REINPLACE_CMD} \
-e 's,/etc/BackupPC/config.pl,${ETCDIR}/config.pl,' \
+ -e 's|Conf{ConfDir}/hosts", 0644)|Conf{ConfDir}/hosts.sample", 0644)|' \
${WRKSRC}/configure.pl
@${REINPLACE_CMD} \
-e 's,"/doc/BackupPC.html","/${DOCSDIR_REL}/BackupPC.html",' \
@@ -102,8 +102,18 @@ post-install:
@cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${DOCSDIR}
.endif
+ @${MV} ${ETCDIR}/config.pl ${ETCDIR}/config.pl.sample
+
@${ECHO_MSG}
@${ECHO_MSG} ">>> ----------------------------------------------------------"
+ @${ECHO_MSG} ">>> You need to copy and customize"
+ @${ECHO_MSG} ">>> # cp -p ${ETCDIR}/config.pl.sample ${ETCDIR}/config.pl"
+
+ @if [ ! -f ${ETCDIR}/hosts ]; then \
+ ${ECHO_MSG} ">>> # cp -p ${ETCDIR}/hosts.sample ${ETCDIR}/hosts"; \
+ fi
+
+ @${ECHO_MSG} ">>>"
@${ECHO_MSG} ">>> Add the following line to /etc/rc.conf to enable BackupPC:"
@${ECHO_MSG} ">>> backuppc_enable=\"YES\""
@${ECHO_MSG} ">>>"
diff --git a/sysutils/backuppc/distinfo b/sysutils/backuppc/distinfo
index 7f4de4440338..394981298f82 100644
--- a/sysutils/backuppc/distinfo
+++ b/sysutils/backuppc/distinfo
@@ -1,3 +1,2 @@
-MD5 (BackupPC-3.2.0.tar.gz) = 4b77610d8d1130daf0892fc7134be985
SHA256 (BackupPC-3.2.0.tar.gz) = cbd8e7ac4e0ce5e9c3784c491fcad3cdaf15b3868a3ab4c871748ec402dc9562
SIZE (BackupPC-3.2.0.tar.gz) = 511394
diff --git a/sysutils/backuppc/pkg-plist b/sysutils/backuppc/pkg-plist
index 1089797e8c65..be5eef5fadb1 100644
--- a/sysutils/backuppc/pkg-plist
+++ b/sysutils/backuppc/pkg-plist
@@ -115,9 +115,9 @@ lib/Net/FTP/RetrHandle.pm
%%WWWDIR%%/logo.gif
%%WWWDIR%%/sorttable.js
www/cgi-bin/BackupPC_Admin
-%%ETCDIR%%/hosts
-%%ETCDIR%%/config.pl
-@dirrm %%ETCDIR%%
+@rmtry %%ETCDIR%%/hosts.sample
+%%ETCDIR%%/config.pl.sample
+@dirrmtry %%ETCDIR%%
@dirrmtry www/cgi-bin
@dirrmtry %%WWWDIR%%
@dirrmtry share/doc/backuppc
@@ -135,6 +135,6 @@ www/cgi-bin/BackupPC_Admin
@unexec echo
@unexec echo " 1) the backuppc user/group: pw userdel backuppc"
@unexec echo " 2) BackupPC configuration: rm -rf %%PREFIX%%/%%ETCDIR%%"
-@unexec echo " 3) BackupPC data directory: rm -rf /data/BackupPC"
+@unexec echo " 3) BackupPC data directory: rm -rf /var/db/BackupPC"
@unexec echo " 4) BackupPC logs directory: rm -rf /var/log/BackupPC"
@unexec echo