Subject: pkg/15869: shells/ast-ksh (unfinished)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <uebayasi@soum.co.jp>
List: netbsd-bugs
Date: 03/11/2002 21:35:05
>Number:         15869
>Category:       pkg
>Synopsis:       Unfinished ast-ksh package
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 11 04:37:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Masao Uebayashi
>Release:        NetBSD 1.5ZA
>Organization:
SOUM Corporation
>Environment:
System: NetBSD oratosquilla.soum.co.jp 1.5ZA NetBSD 1.5ZA (ORATOSQUILLA) #0: Fri Feb 22 10:49:22 JST 2002 uebayasi@oratosquilla.soum.co.jp:/src/src/sys/arch/i386/compile/ORATOSQUILLA i386
Architecture: i386
Machine: i386
>Description:
I've created ast-ksh package borrowing OpenBSD's one, but I don't have
much time this week so I hope someone takes over this unfinished
package...

Many warning taht INT_MAX and its cousins' definitions are duplicated,
but I could get an executable.  INSTALL/DEINSTALL scripts are yet as
is, need to be fixed.
>How-To-Repeat:
Extract under pkgsrc/shells.
>Fix:
	* Please test if the package can build on hosts other than i386.

	* Correct INSTALL/DEINSTALL scripts.

	* Nuke errors issued by pkglint.

	* The resulting package may be as small as now, so it seems okay to
	  simply reply to this mail and attach a revised shell archive again.

Thank you.

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	ast-ksh
#	ast-ksh/Makefile
#	ast-ksh/DEINSTALL
#	ast-ksh/distinfo
#	ast-ksh/DESCR
#	ast-ksh/INSTALL
#	ast-ksh/PLIST
#
echo c - ast-ksh
mkdir -p ast-ksh > /dev/null 2>&1
echo x - ast-ksh/Makefile
sed 's/^X//' >ast-ksh/Makefile << 'END-of-ast-ksh/Makefile'
X# $OpenBSD: Makefile,v 1.5 2001/11/21 01:17:43 naddy Exp $
X# $NetBSD$
X
X
XDISTNAME=	ast-ksh-${VERSION}
XPKGNAME=	ast-ksh-${VERSION:S/-//g}
XVERSION=	2001-10-31
XCATEGORIES=	shells
XCOMMENT=	"official AT&T release of KornShell 93"
X
XHOMEPAGE=	http://www.kornshell.com/
XMAINTAINER=	packages@netbsd.org
X
XRESTRICTED=	"Terms for redistribution are not yet clear."
XNO_BIN_ON_CDROM=${RESTRICTED}
XNO_BIN_ON_FTP=	${RESTRICTED}
XNO_SRC_ON_CDROM=${RESTRICTED}
XNO_SRC_ON_FTP=	${RESTRICTED}
X
XMASTER_SITES=	http://www.research.att.com/~gsf/download/tgz/
XDISTFILES=	INIT.${VERSION}.tgz ast-ksh.${VERSION}.tgz
X
XWRKSRC=		${WRKDIR}
XMAKE_FLAGS=	CC='${CC}' CCFLAGS='${CFLAGS}'
X
Xdo-build:
X	cd ${WRKSRC}; \
X	${SETENV} SHELL=${SH} ${SH} ./bin/package ${MAKE_PROGRAM} ${MAKE_FLAGS}
X
Xdo-install:
X	arch=`${WRKSRC}/bin/package host`; \
X	${INSTALL_PROGRAM} ${WRKSRC}/arch/$${arch}/bin/ksh \
X		${PREFIX}/bin/ksh93; \
X	${INSTALL_MAN} ${WRKSRC}/arch/$${arch}/man/man1/sh.1 \
X		${PREFIX}/man/man1/ksh93.1
X
X.include "../../mk/bsd.pkg.mk"
END-of-ast-ksh/Makefile
echo x - ast-ksh/DEINSTALL
sed 's/^X//' >ast-ksh/DEINSTALL << 'END-of-ast-ksh/DEINSTALL'
X#!/bin/sh
X# $NetBSD$
X# $OpenBSD: DEINSTALL,v 1.1.1.1 2001/07/12 19:17:24 naddy Exp $
X#
X# ksh93 de-installation
X
X# exit on errors, use a sane path and install prefix
X#
Xset -e
XPATH=/bin:/usr/bin:/sbin:/usr/sbin
XPREFIX=${PKG_PREFIX:-/usr/local}
X
X# Function: tell the user what they need to do to delete the port completely
X#
Xdo_notice()
X{
X    echo
X    echo "+---------------"
X    echo "| To completely deinstall the $1 package you need to edit"
X    echo "| /etc/shells and remove this line:"
X    echo "|"
X    echo "|           $PREFIX/bin/ksh93"
X    echo "|"
X    echo "+---------------"
X    echo
X}
X
X# Verify proper execution
X#
Xif [ $# -ne 2 ]; then
X    echo "usage: $0 distname DEINSTALL" >&2
X    exit 1
Xfi
X
X# Verify/process the command
X#
Xcase $2 in
X    DEINSTALL)
X	if grep -q $PREFIX/bin/ksh93 /etc/shells; then
X	    do_notice "$1"
X	fi
X	;;
X    *)
X	echo "usage: $0 distname DEINSTALL" >&2
X	exit 1
X	;;
Xesac
X
Xexit 0
END-of-ast-ksh/DEINSTALL
echo x - ast-ksh/distinfo
sed 's/^X//' >ast-ksh/distinfo << 'END-of-ast-ksh/distinfo'
X$NetBSD$
X
XSHA1 (INIT.2001-10-31.tgz) = c37f15945bec23ae71f6910be62f04beca0b044b
XSize (INIT.2001-10-31.tgz) = 212020 bytes
XSHA1 (ast-ksh.2001-10-31.tgz) = ea7e2f38303133ef5df5c5dbae4bf56802590118
XSize (ast-ksh.2001-10-31.tgz) = 1328492 bytes
END-of-ast-ksh/distinfo
echo x - ast-ksh/DESCR
sed 's/^X//' >ast-ksh/DESCR << 'END-of-ast-ksh/DESCR'
XKSH-93 is the most recent version of the KornShell Language described
Xin "The KornShell Command and Programming Language," by Morris
XBolsky and David Korn of AT&T Bell Laboratories.  The KornShell is
Xa shell programming language, which is upward compatible with "sh"
X(the Bourne Shell), and is intended to conform to the IEEE P1003.2/ISO
X9945.2 Shell and Utilities standard.  KSH-93 provides an enhanced
Xprogramming environment in addition to the major command-entry
Xfeatures of the BSD shell "csh".  With KSH-93, medium-sized programming
Xtasks can be performed at shell-level without a significant loss
Xin performance.  In addition, "sh" scripts can be run on KSH-93
Xwithout modification.
END-of-ast-ksh/DESCR
echo x - ast-ksh/INSTALL
sed 's/^X//' >ast-ksh/INSTALL << 'END-of-ast-ksh/INSTALL'
X#!/bin/sh
X# $NetBSD$
X# $OpenBSD: INSTALL,v 1.1.1.1 2001/07/12 19:17:24 naddy Exp $
X#
X# Pre/post-installation setup of ksh93
X
X# exit on errors, use a sane path and install prefix
X#
Xset -e
XPATH=/bin:/usr/bin:/sbin:/usr/sbin
XPREFIX=${PKG_PREFIX:-/usr/local}
X
X# Function: tell the user what s/he needs to do to use the port just installed
X#
Xdo_notice()
X{
X    echo
X    echo "+---------------"
X    echo "| For proper use of $1 you should notify the system"
X    echo "| that $PREFIX/bin/ksh93 is a valid shell by adding it to the"
X    echo "| the file /etc/shells.  If you are unfamiliar with this file"
X    echo "| consult the shells(5) manual page"
X    echo "+---------------"
X    echo
X}
X
X# verify proper execution
X#
Xif [ $# -ne 2 ]; then
X    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
X    exit 1
Xfi
X
X# Verify/process the command
X#
Xcase $2 in
X    PRE-INSTALL)
X	: nothing to pre-install for this port
X	;;
X    POST-INSTALL)
X	if grep -q $PREFIX/bin/ksh93 /etc/shells; then
X	    :
X	else
X	    do_notice $1
X	fi
X	;;
X    *)
X	echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
X	exit 1
X	;;
Xesac
X
Xexit 0
END-of-ast-ksh/INSTALL
echo x - ast-ksh/PLIST
sed 's/^X//' >ast-ksh/PLIST << 'END-of-ast-ksh/PLIST'
X@comment $NetBSD$
X@comment $OpenBSD: PLIST,v 1.1.1.1 2001/07/12 19:17:24 naddy Exp $
Xbin/ksh93
Xman/man1/ksh93.1
END-of-ast-ksh/PLIST
exit
>Release-Note:
>Audit-Trail:
>Unformatted: