diff options
author | adam <adam@FreeBSD.org> | 1995-05-06 04:07:55 +0800 |
---|---|---|
committer | adam <adam@FreeBSD.org> | 1995-05-06 04:07:55 +0800 |
commit | db32ba5119c57d1ba39c573126e06fd8939b3535 (patch) | |
tree | 4e0d6fbc3f1895f0dddcc6275b9f8b6579f23e77 | |
parent | 393364f56ca9c309d47a31cee118dc56205e613a (diff) | |
download | freebsd-ports-gnome-db32ba5119c57d1ba39c573126e06fd8939b3535.tar.gz freebsd-ports-gnome-db32ba5119c57d1ba39c573126e06fd8939b3535.tar.zst freebsd-ports-gnome-db32ba5119c57d1ba39c573126e06fd8939b3535.zip |
fixed install and package
package is only created if YES_PACKAGE is defined, because of site-dependent
values compiled in.
-rw-r--r-- | www/gn/Makefile | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/www/gn/Makefile b/www/gn/Makefile index df65581ec30c..f851f7b3ae7c 100644 --- a/www/gn/Makefile +++ b/www/gn/Makefile @@ -3,7 +3,7 @@ # Date created: 20 Sep 1994 # Whom: adam # -# $Id: Makefile,v 1.7 1995/04/15 05:41:29 asami Exp $ +# $Id: Makefile,v 1.8 1995/05/04 23:29:05 adam Exp $ # DISTNAME= gn-2.22 @@ -12,26 +12,52 @@ MASTER_SITES= ftp://ftp.acns.nwu.edu/pub/gn/ DEPENDS= ${PORTSDIR}/net/wais IS_INTERACTIVE= yes +.if !defined(YES_PACKAGE) +YES_INSTALL= +NO_PACKAGE= +.endif INETD_CONF= /etc/inetd.conf -CONF= ' stream tcp nowait nobody /usr/local/etc/gn gn' +CONF= ' stream tcp nowait nobody /usr/local/libexec/gn gn' pre-build: @ln -fs ${PORTSDIR}/net/wais/work/freeWAIS-0.3/ir ${WRKSRC}/waisgn @ln -fs ${PORTSDIR}/net/wais/work/freeWAIS-0.3/bin ${WRKSRC}/waisgn pre-install: - @grep -q '^gopher' ${INETD_CONF} || { \ + @mkdir -p ${WRKSRC}/etc ${WRKSRC}/libexec ${WRKSRC}/gnroot + @cd ${WRKSRC}/gnroot; \ + tar -cf - -C ${WRKSRC} docs | tar xpf - && \ + mv docs/sample.root.menu menu + +.if defined(YES_INSTALL) +post-install: + @cd ${PREFIX}; \ + if [ -s etc/gn_mime.types ]; then \ + cmp -s etc/gn_mime.types ${WRKSRC}/etc/gn_mime.types || { \ + echo Aborting install due to ${PREFIX}/etc/gn_mime.types; \ + exit 0; \ + }; \ + fi; \ + if [ -s gnroot/menu ]; then \ + cmp -s gnroot/menu ${WRKSRC}/gnroot/menu || { \ + echo Aborting install due to ${PREFIX}/gnroot/menu; \ + exit 0; \ + }; \ + fi; \ + tar -cf - -C ${WRKSRC} gnroot | tar xpf - && \ + (cd gnroot; ${WRKSRC}/bin/mkcache -r); \ + awk '$$1 == "gopher" { exit 1 }' ${INETD_CONF} || { \ echo gopher${CONF} >>${INETD_CONF}; \ kill -HUP \ - `ps ax | grep inetd | grep -v grep | awk '{ print $$1 }'`; \ - } - @if [ ! -d /usr/local/gnroot ]; then \ - mkdir -p /usr/local/gnroot; \ - cd /usr/local/gnroot; \ - tar -C ${WRKSRC} -cf - docs | tar xpf -; \ - mv docs/sample.root.menu menu; \ - ${WRKSRC}/mkcache/mkcache -r; \ - fi + `ps ax | awk '$$5 == "inetd" { print $$1 }'`; \ + } +.endif + +.if !defined(DO_PACKAGE) +do-package: + @${MAKE} ${.MAKEFLAGS} 'PKG_CMD= WRKSRC=${WRKSRC} ${PKG_CMD}' \ + DO_PACKAGE= do-package +.endif .include <bsd.port.mk> |