aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2001-06-18 01:23:24 +0800
committerolgeni <olgeni@FreeBSD.org>2001-06-18 01:23:24 +0800
commit88bb820b994e842dcdba10e68211591efb157fe8 (patch)
tree3ea97164ba7ab7580df2d6e8ed634f04defb7a85 /graphics
parent3053cf9fb54d6f81feccac54ac3d4a3e430985a6 (diff)
downloadfreebsd-ports-gnome-88bb820b994e842dcdba10e68211591efb157fe8.tar.gz
freebsd-ports-gnome-88bb820b994e842dcdba10e68211591efb157fe8.tar.zst
freebsd-ports-gnome-88bb820b994e842dcdba10e68211591efb157fe8.zip
Preserve configuration file in etc/.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/qcread/Makefile6
-rw-r--r--graphics/qcread/pkg-plist4
2 files changed, 7 insertions, 3 deletions
diff --git a/graphics/qcread/Makefile b/graphics/qcread/Makefile
index 69f337befd23..f2be0782f6ce 100644
--- a/graphics/qcread/Makefile
+++ b/graphics/qcread/Makefile
@@ -20,8 +20,10 @@ post-extract:
@${CP} -r ${WRKSRC}/gnu-getopt/. ${WRKSRC}
do-install:
-
- ${INSTALL} ${COPY} -o root -g wheel -m 644 ${WRKSRC}/qcam.conf ${PREFIX}/etc
+ ${INSTALL} ${COPY} -o root -g wheel -m 644 ${WRKSRC}/qcam.conf ${PREFIX}/etc/qcam.conf.dist
+ if [ ! -e ${PREFIX}/etc/qcam.conf ]; then \
+ ${CP} ${PREFIX}/etc/qcam.conf.dist ${PREFIX}/etc/qcam.conf; \
+ fi
${INSTALL_PROGRAM} ${WRKSRC}/qcread ${PREFIX}/bin
.include <bsd.port.mk>
diff --git a/graphics/qcread/pkg-plist b/graphics/qcread/pkg-plist
index ccb84814dd64..5e0a611d24da 100644
--- a/graphics/qcread/pkg-plist
+++ b/graphics/qcread/pkg-plist
@@ -1,2 +1,4 @@
bin/qcread
-etc/qcam.conf
+@unexec if cmp -s %D/etc/qcam.conf %D/etc/qcam.conf.dist; then rm -f %D/etc/qcam.conf; fi
+etc/qcam.conf.dist
+@exec [ -f %B/qcam.conf ] || cp %B/%f %B/qcam.conf