From 72c87d68fd0c97c277bc5dd2581bca9c704ee911 Mon Sep 17 00:00:00 2001 From: abs Date: Fri, 20 Sep 2002 17:00:41 +0000 Subject: Handle netscape7, and used sed rather than what would need to be four versions of the startup script. The versioning here depends on the navigator package and is difficult to fix cleanly... --- www/netscape/Makefile | 34 +++++++++++++++------------------- www/netscape/files/netscape | 9 +++++++++ www/netscape/files/netscape_mozilla | 9 --------- www/netscape/files/netscape_navigator | 9 --------- 4 files changed, 24 insertions(+), 37 deletions(-) create mode 100644 www/netscape/files/netscape delete mode 100644 www/netscape/files/netscape_mozilla delete mode 100644 www/netscape/files/netscape_navigator (limited to 'www') diff --git a/www/netscape/Makefile b/www/netscape/Makefile index 512f226f6a9..141ba882bf2 100644 --- a/www/netscape/Makefile +++ b/www/netscape/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2002/08/25 21:52:18 jlam Exp $ +# $NetBSD: Makefile,v 1.9 2002/09/20 17:00:41 abs Exp $ # COMMENT= Open new communicator, navigator, or mozilla window @@ -7,38 +7,34 @@ BINNAME= netscape .include "../navigator/Makefile.common" -DEPENDS+= ns-remote>=1.3:../../www/ns-remote .if defined(NS_PREFERRED) && ${NS_PREFERRED} == mozilla -DEPENDS+= {mozilla,navigator,communicator}-[0-9]*:../../www/mozilla -.else -.if defined(NS_PREFERRED) && ${NS_PREFERRED} == navigator -DEPENDS+= {navigator,communicator,mozilla}-[0-9]*:../../www/navigator +NETSCAPE_PREFERRED=mozilla:navigator:communicator:netscape7 +.elif defined(NS_PREFERRED) && ${NS_PREFERRED} == netscape7 +NETSCAPE_PREFERRED=netscape7:navigator:communicator:mozilla +.elif defined(NS_PREFERRED) && ${NS_PREFERRED} == navigator +NETSCAPE_PREFERRED=navigator:communicator:mozilla:netscape7 .else -DEPENDS+= {communicator,navigator,mozilla}-[0-9]*:../../www/communicator -.endif +NETSCAPE_PREFERRED=communicator:navigator:mozilla:netscape7 .endif +DEPENDS+= ns-remote>=1.3:../../www/ns-remote +DEPENDS+={${NETSCAPE_PREFERRED:C:\::,:g}}-[0-9]*:../../www/${NETSCAPE_PREFERRED:S:\:.*::} + DISTFILES= # empty MASTER_SITES= # empty USE_BUILDLINK2= # defined -EXTRACT_ONLY= # empty WRKSRC= ${WRKDIR} NO_CHECKSUM= yes NO_PATCH= yes NO_CONFIGURE= yes -do-install: +do-build: + ${SED} "s/@NETSCAPE_PREFERRED@/${NETSCAPE_PREFERRED}/" \ + ${FILESDIR}/netscape > ${WRKSRC}/netscape -.if defined(NS_PREFERRED) && ${NS_PREFERRED} == mozilla - ${INSTALL_SCRIPT} ${FILESDIR}/netscape_mozilla ${PREFIX}/bin/netscape -.else -.if defined(NS_PREFERRED) && ${NS_PREFERRED} == navigator - ${INSTALL_SCRIPT} ${FILESDIR}/netscape_navigator ${PREFIX}/bin/netscape -.else - ${LN} -sf ns-open ${PREFIX}/bin/netscape -.endif -.endif +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/netscape ${PREFIX}/bin/netscape .include "../../emulators/suse_linux/Makefile.application" diff --git a/www/netscape/files/netscape b/www/netscape/files/netscape new file mode 100644 index 00000000000..3f495dea32c --- /dev/null +++ b/www/netscape/files/netscape @@ -0,0 +1,9 @@ +#!/bin/sh +# $NetBSD: netscape,v 1.1 2002/09/20 17:00:41 abs Exp $ + +# Simple script used if NS_MOZILLA is set when netscape installed + +if [ -z "$NETSCAPE_PREFERRED" ]; then + export NETSCAPE_PREFERRED=@NETSCAPE_PREFERRED@ +fi +exec ns-open "$@" diff --git a/www/netscape/files/netscape_mozilla b/www/netscape/files/netscape_mozilla deleted file mode 100644 index 5d8ce18a066..00000000000 --- a/www/netscape/files/netscape_mozilla +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# $NetBSD: netscape_mozilla,v 1.2 2002/03/11 10:18:25 abs Exp $ - -# Simple script used if NS_MOZILLA is set when netscape installed - -if [ -z "$NETSCAPE_PREFERRED" ]; then - NETSCAPE_PREFERRED=mozilla:navigator:communicator -fi -exec ns-open "$@" diff --git a/www/netscape/files/netscape_navigator b/www/netscape/files/netscape_navigator deleted file mode 100644 index a3eef5d7a87..00000000000 --- a/www/netscape/files/netscape_navigator +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# $NetBSD: netscape_navigator,v 1.3 2002/03/11 10:18:25 abs Exp $ - -# Simple script used if NS_NAVIGATOR is set when netscape installed - -if [ -z "$NETSCAPE_PREFERRED" ]; then - NETSCAPE_PREFERRED=navigator:communicator:mozilla -fi -exec ns-open "$@" -- cgit v1.2.3