fixing up FreeBSD port Makefile to handle post-install config file creation properly.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 12 Sep 2008 07:02:34 +0000 (03:02 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 12 Sep 2008 07:02:34 +0000 (03:02 -0400)
packaging/freebsd/Makefile

index 82e3bf88f58bf67e94388a89192734d085daf151..1381ba4f00366f7d559a4186414a98c761183b19 100644 (file)
@@ -31,4 +31,12 @@ MANCOMPRESSED= yes
 
 MAKE_ARGS= ETCPREFIX=/usr/local MANPREFIX=/usr/local/man ETCSUFFIX=.sample
 
+post-install:
+       @if [ ! -f ${PREFIX}/etc/monkeysphere/monkeysphere.conf ]; then \
+               ${CP} -p ${PREFIX}/etc/monkeysphere/monkeysphere.conf.sample ${PREFIX}/etc/monkeysphere/monkeysphere.conf ; \
+       fi
+       @if [ ! -f ${PREFIX}/etc/monkeysphere/monkeysphere-server.conf ]; then \
+               ${CP} -p ${PREFIX}/etc/monkeysphere/monkeysphere-server.conf.sample ${PREFIX}/etc/monkeysphere/monkeysphere-server.conf ; \
+       fi
+
 .include <bsd.port.mk>