Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Mar 2008 14:32:54 +0100 (CET)
From:      Danijel Tasov <danielt@pilgerer.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/122192: New port: shells/heirloom-sh: Portable version of OpenSolaris' #!/bin/sh
Message-ID:  <200803281332.m2SDWsiX089183@trial.pilgerer.de>
Resent-Message-ID: <200803281400.m2SE02cb065340@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         122192
>Category:       ports
>Synopsis:       New port: shells/heirloom-sh: Portable version of OpenSolaris' #!/bin/sh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 28 14:00:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Danijel Tasov
>Release:        FreeBSD 6.3-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD trial.pilgerer.de 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #7: Wed Oct 24 16:31:40 CEST 2007 benny@trial.pilgerer.de:/usr/obj/usr/src/sys/TRIAL i386


	
>Description:
	Heirloom sh is a portable version of OpenSolairs' #!/bin/sh. It is
        useful for developing Bourne Shell scripts with portability in mind.
>How-To-Repeat:
	
>Fix:

	

--- heirloom-sh.shar begins here ---
# 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:
#
#	heirloom-sh/
#	heirloom-sh/files
#	heirloom-sh/files/patch-acct
#	heirloom-sh/Makefile
#	heirloom-sh/pkg-descr
#	heirloom-sh/pkg-install
#	heirloom-sh/pkg-deinstall
#	heirloom-sh/distinfo
#
echo c - heirloom-sh/
mkdir -p heirloom-sh/ > /dev/null 2>&1
echo c - heirloom-sh/files
mkdir -p heirloom-sh/files > /dev/null 2>&1
echo x - heirloom-sh/files/patch-acct
sed 's/^X//' >heirloom-sh/files/patch-acct << 'END-of-heirloom-sh/files/patch-acct'
Xdiff -ru heirloom-sh-050706/defs.h heirloom-sh-050706.new/defs.h
X--- defs.h	2005-07-03 21:25:46.000000000 +0200
X+++ defs.h	2008-03-27 22:30:33.000000000 +0100
X@@ -148,7 +148,7 @@
X #define		ENDARGS		0
X 
X /* enable shell accounting */
X-#define		ACCT
X+/* #define		ACCT */
X 
X #include	<unistd.h>
X #include	"mac.h"
END-of-heirloom-sh/files/patch-acct
echo x - heirloom-sh/Makefile
sed 's/^X//' >heirloom-sh/Makefile << 'END-of-heirloom-sh/Makefile'
X# Ports collection makefile for:	heirloom-sh
X# Date created:				2008-03-28
X# Whom:					Danijel Tasov <danielt@pilgerer.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		heirloom-sh
XPORTVERSION=		050706
XCATEGORIES=		shells
XMASTER_SITES=           ${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=     heirloom
XDISTNAME=		${PORTNAME}-${PORTVERSION}
X
XMAINTAINER=		danielt@pilgerer.org
XCOMMENT=		Portable version of OpenSolaris' Bourne Shell
X
XWRKSRC=			${WRKDIR}/${PORTNAME}-${PORTVERSION}
X
XUSE_BZIP2=		yes
XMAN1=			jsh.1
XPLIST_FILES=		bin/jsh bin/heirloom-sh
XPORTDOCS=		CALDERA.LICENSE OPENSOLARIS.LICENSE CHANGES README
X
XPKGINSTALL=		pkg-install
XPKGDEINSTALL=		pkg-deinstall
X
X.include <bsd.port.pre.mk>
X
Xdo-build:
X	cd ${WRKSRC} && make
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/jsh ${PREFIX}/bin
X	${INSTALL_MAN} ${WRKSRC}/sh.1.out ${MANPREFIX}/man/man1/jsh.1
X	${LN} ${PREFIX}/bin/jsh ${PREFIX}/bin/heirloom-sh
X
Xpre-install:
X	@${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" \
X		${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
X.endif
X	@${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" \
X		${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
X.include <bsd.port.post.mk>
END-of-heirloom-sh/Makefile
echo x - heirloom-sh/pkg-descr
sed 's/^X//' >heirloom-sh/pkg-descr << 'END-of-heirloom-sh/pkg-descr'
XHeirloom-sh is a portable version of OpenSolaris' #!/bin/sh.
XIf one need to write portable shell scripts, this one is excellent for
Xtesting them. It is installed as jsh (job shell).
X
XOther OpenSolaris user land tools are available in sysutils/heirloom
X
XWWW: http://heirloom.sourceforge.net/sh.html
END-of-heirloom-sh/pkg-descr
echo x - heirloom-sh/pkg-install
sed 's/^X//' >heirloom-sh/pkg-install << 'END-of-heirloom-sh/pkg-install'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
XJSH="$(echo ${PKG_PREFIX-/usr/local}/bin/jsh | /usr/bin/sed -e 's|//|/|g')"
XSHELLS="/etc/shells"
X
Xcase $2 in
XPOST-INSTALL)
X  if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$JSH\$" "$SHELLS"; then
X    if [ $(id -u) -eq 0 ]; then
X      echo "$JSH" >> "$SHELLS"
X    else
X      echo "Not root, please add $JSH to $SHELLS manually"
X    fi
X  fi
X  ;;
Xesac
END-of-heirloom-sh/pkg-install
echo x - heirloom-sh/pkg-deinstall
sed 's/^X//' >heirloom-sh/pkg-deinstall << 'END-of-heirloom-sh/pkg-deinstall'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
XJSH="$(echo ${PKG_PREFIX-/usr/local}/bin/jsh | /usr/bin/sed -e 's|//|/|g')"
XSHELLS="${PKG_DESTDIR-}/etc/shells"
X
Xcase $2 in
XDEINSTALL)
X  if grep -qs "^$JSH\$" "$SHELLS"; then
X    if [ $(id -u) -eq 0 ]; then
X      TMPSHELLS=$(mktemp -t shells)
X      grep -v "^$JSH\$" "$SHELLS" > "$TMPSHELLS"
X      cat "$TMPSHELLS" > "$SHELLS"
X      rm "$TMPSHELLS"
X    else
X      echo "Not root, please remove $JSH from $SHELLS manually"
X    fi
X  fi
X  ;;
Xesac
END-of-heirloom-sh/pkg-deinstall
echo x - heirloom-sh/distinfo
sed 's/^X//' >heirloom-sh/distinfo << 'END-of-heirloom-sh/distinfo'
XMD5 (heirloom-sh-050706.tar.bz2) = 9169d9b3b845cb63c598ea29b8d2dfa0
XSHA256 (heirloom-sh-050706.tar.bz2) = 25fb8409e1eb75bb5da21ca32baf2d5eebcb8b84a1288d66e65763a125809e1d
XSIZE (heirloom-sh-050706.tar.bz2) = 82725
END-of-heirloom-sh/distinfo
exit
--- heirloom-sh.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803281332.m2SDWsiX089183>