diff options
author | dd <dd@FreeBSD.org> | 2006-01-07 23:31:52 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2006-01-07 23:31:52 +0000 |
commit | 33bc574bc254ae8e723d9a009b3836de2f506664 (patch) | |
tree | 6621132685cacefa10cfbfb8cf55af0034bfde9d /textproc | |
parent | 3edd795f90b47ba204abdc4dcdb1b82de5c94a8e (diff) | |
download | FreeBSD-ports-33bc574bc254ae8e723d9a009b3836de2f506664.zip FreeBSD-ports-33bc574bc254ae8e723d9a009b3836de2f506664.tar.gz |
Avoid clobbering a modified dict.conf on deinstall.
PR: 91294
Submitted by: Rong-En Fan
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/dict/Makefile | 5 | ||||
-rw-r--r-- | textproc/dict/pkg-plist | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/textproc/dict/Makefile b/textproc/dict/Makefile index 443dcc1..d170c37 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 e97bed3..5721bd9 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 |