make sure that the /etc/monkeysphere/gpg-*.conf are placed during package installation.
[monkeysphere.git] / packaging / freebsd / Makefile
index 7a24dc58e1723fa8c18d9043b7eca8d63db25cbd..f4bf0fe2d54a220086704f71627f66380e775cf0 100644 (file)
@@ -12,9 +12,6 @@ MASTER_SITES=  http://archive.monkeysphere.info/debian/pool/monkeysphere/m/monke
 # hack for debian orig tarballs
 DISTFILES=      ${PORTNAME}_${DISTVERSION}.orig.tar.gz
 
-# comment this out to test the port
-IGNORE=                        this port is not finished yet
-
 MAINTAINER=    dkg@fifthhorseman.net
 COMMENT=       use the OpenPGP web of trust to verify ssh connections
 
@@ -37,11 +34,23 @@ post-patch:
        find . -iname '*.orig' -delete
 
 post-install:
+       @if [ ! -f ${PREFIX}/etc/monkeysphere/gnupg-host.conf ]; then \
+               ${CP} -p ${PREFIX}/etc/monkeysphere/gnupg-host.conf.sample ${PREFIX}/etc/monkeysphere/gnupg-host.conf ; \
+       fi
+       @if [ ! -f ${PREFIX}/etc/monkeysphere/gnupg-authentication.conf ]; then \
+               ${CP} -p ${PREFIX}/etc/monkeysphere/gnupg-authentication.conf.sample ${PREFIX}/etc/monkeysphere/gnupg-authentication.conf ; \
+       fi
        @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
+.if !defined(PACKAGE_BUILDING)
+       @${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
+
+post-deinstall:
+       @${SETENV} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
 
 .include <bsd.port.mk>