1994-09-23 20:25:10 +00:00
|
|
|
# New ports collection makefile for: gn
|
1994-10-20 12:56:36 +00:00
|
|
|
# Version required: 2.17
|
1994-09-23 20:25:10 +00:00
|
|
|
# Date created: 20 Sep 1994
|
|
|
|
# Whom: adam
|
|
|
|
#
|
1995-11-27 04:10:35 +00:00
|
|
|
# $Id: Makefile,v 1.11 1995/10/20 09:14:12 adam Exp $
|
1994-09-23 20:25:10 +00:00
|
|
|
#
|
|
|
|
|
1995-10-20 08:52:08 +00:00
|
|
|
DISTNAME= gn-2.23
|
1995-11-27 04:10:35 +00:00
|
|
|
CATEGORIES+= www net
|
1995-04-15 05:42:12 +00:00
|
|
|
MASTER_SITES= ftp://ftp.acns.nwu.edu/pub/gn/
|
|
|
|
|
1995-10-20 08:52:08 +00:00
|
|
|
WAISDIR= ${PORTSDIR}/net/wais/work/freeWAIS-0.3
|
|
|
|
BUILD_DEPENDS= ${WAISDIR}/bin/waisindex:${PORTSDIR}/net/wais
|
|
|
|
|
1994-11-09 23:08:51 +00:00
|
|
|
IS_INTERACTIVE= yes
|
1995-10-20 08:52:08 +00:00
|
|
|
# This quaint mechanism is for forcing package creation from a staging area.
|
1995-05-05 20:07:55 +00:00
|
|
|
.if !defined(YES_PACKAGE)
|
|
|
|
YES_INSTALL=
|
1995-10-20 09:14:12 +00:00
|
|
|
NO_PACKAGE= # compiled in hostnames
|
1995-05-05 20:07:55 +00:00
|
|
|
.endif
|
1994-09-23 20:25:10 +00:00
|
|
|
|
1995-04-15 05:42:12 +00:00
|
|
|
INETD_CONF= /etc/inetd.conf
|
1995-05-05 20:07:55 +00:00
|
|
|
CONF= ' stream tcp nowait nobody /usr/local/libexec/gn gn'
|
1995-04-15 05:42:12 +00:00
|
|
|
|
1994-09-23 20:25:10 +00:00
|
|
|
pre-build:
|
1995-10-20 08:52:08 +00:00
|
|
|
@ln -fs ${WAISDIR}/ir ${WRKSRC}/waisgn
|
|
|
|
@ln -fs ${WAISDIR}/bin ${WRKSRC}/waisgn
|
1994-09-23 20:25:10 +00:00
|
|
|
|
|
|
|
pre-install:
|
1995-05-05 20:07:55 +00:00
|
|
|
@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; \
|
1995-10-20 08:52:08 +00:00
|
|
|
tar -cf - -C ${WRKSRC} gnroot libexec bin etc | tar xpf - && \
|
1995-05-05 20:07:55 +00:00
|
|
|
(cd gnroot; ${WRKSRC}/bin/mkcache -r); \
|
|
|
|
awk '$$1 == "gopher" { exit 1 }' ${INETD_CONF} || { \
|
1994-09-23 20:25:10 +00:00
|
|
|
echo gopher${CONF} >>${INETD_CONF}; \
|
|
|
|
kill -HUP \
|
1995-05-05 20:07:55 +00:00
|
|
|
`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
|
1994-09-23 20:25:10 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|