aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2006-01-08 07:31:52 +0800
committerdd <dd@FreeBSD.org>2006-01-08 07:31:52 +0800
commit33bc574bc254ae8e723d9a009b3836de2f506664 (patch)
tree6621132685cacefa10cfbfb8cf55af0034bfde9d
parent3edd795f90b47ba204abdc4dcdb1b82de5c94a8e (diff)
downloadfreebsd-ports-gnome-33bc574bc254ae8e723d9a009b3836de2f506664.tar.gz
freebsd-ports-gnome-33bc574bc254ae8e723d9a009b3836de2f506664.tar.zst
freebsd-ports-gnome-33bc574bc254ae8e723d9a009b3836de2f506664.zip
Avoid clobbering a modified dict.conf on deinstall.
PR: 91294 Submitted by: Rong-En Fan
-rw-r--r--textproc/dict/Makefile5
-rw-r--r--textproc/dict/pkg-plist4
2 files changed, 6 insertions, 3 deletions
diff --git a/textproc/dict/Makefile b/textproc/dict/Makefile
index 443dcc1922c3..d170c3730de0 100644
--- a/textproc/dict/Makefile
+++ b/textproc/dict/Makefile
@@ -8,7 +8,7 @@
PORTNAME= dict
PORTVERSION= 1.10.4
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= dict
@@ -33,8 +33,9 @@ post-patch:
${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' ${WRKSRC}/dict.1.in
post-install:
+ ${INSTALL_DATA} ${FILESDIR}/dict.conf ${PREFIX}/etc/dict.conf.sample
if [ ! -f ${PREFIX}/etc/dict.conf ]; then \
- ${INSTALL_DATA} ${FILESDIR}/dict.conf ${PREFIX}/etc; \
+ ${CP} -p ${PREFIX}/etc/dict.conf.sample ${PREFIX}/etc/dict.conf; \
fi
.include <bsd.port.mk>
diff --git a/textproc/dict/pkg-plist b/textproc/dict/pkg-plist
index e97bed355c50..5721bd91c90a 100644
--- a/textproc/dict/pkg-plist
+++ b/textproc/dict/pkg-plist
@@ -1,4 +1,6 @@
@comment $FreeBSD$
bin/dict
bin/dictl
-etc/dict.conf
+@unexec if cmp -s %D/etc/dict.conf.sample %D/etc/dict.conf; then rm -f %D/etc/dict.conf; fi
+etc/dict.conf.sample
+@exec [ -f %B/dict.conf ] || cp %B/%f %B/dict.conf