summaryrefslogtreecommitdiff
path: root/shells/ast-ksh/Makefile
blob: 9d3adf311163318ccdff46ee16ee7f27862bed66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# $OpenBSD: Makefile,v 1.5 2001/11/21 01:17:43 naddy Exp $
# $NetBSD: Makefile,v 1.8 2003/03/29 12:42:25 jmmv Exp $

DISTNAME=	ast-ksh-${ASTKSH_VERSION}
PKGNAME=	ast-ksh-${ASTKSH_VERSION:S/-//g}
WRKSRC=		${WRKDIR}
CATEGORIES=	shells
MASTER_SITES=	http://www.research.att.com/~gsf/download/tgz/
DISTFILES=	INIT.${ASTKSH_VERSION}.tgz ast-ksh.${ASTKSH_VERSION}.tgz

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://www.kornshell.com/
COMMENT=	official AT&T release of KornShell 93

RESTRICTED=	"Terms for redistribution are not yet clear."
NO_BIN_ON_CDROM=${RESTRICTED}
NO_BIN_ON_FTP=	${RESTRICTED}
NO_SRC_ON_CDROM=${RESTRICTED}
NO_SRC_ON_FTP=	${RESTRICTED}

# needs pdksh
ONLY_FOR_PLATFORM=	NetBSD-*

ASTKSH_VERSION=	2002-12-21

USE_BUILDLINK2=	YES
USE_PKGINSTALL=	YES
MAKE_FLAGS=	CC="${CC}" CCFLAGS="${CFLAGS}"

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "NetBSD"
PDKSH=		/bin/ksh
.endif

PKG_SHELL=	${PREFIX}/bin/ksh93

# XXX Note that this 'make' is not an executable command, but a target name
# ./bin/package uses.
do-build:
	@cd ${WRKSRC}; \
		${SETENV} SHELL=${PDKSH} ${PDKSH} ./bin/package make

do-install:
	@arch=`${WRKSRC}/bin/package host`; \
		${INSTALL_PROGRAM} ${WRKSRC}/arch/$${arch}/bin/ksh \
			${PREFIX}/bin/ksh93; \
		${INSTALL_MAN} ${WRKSRC}/arch/$${arch}/man/man1/sh.1 \
			${PREFIX}/man/man1/ksh93.1

# Part of regression test
do-test:
	@cd ${WRKSRC}/src/cmd/ksh93/tests && \
		${SETENV} SHELL=${PREFIX}/bin/ksh93 ${PREFIX}/bin/ksh93 shtests
# XXX Their 'test' target needs nmake (Korn's another tool)
#	@cd ${WRKSRC}; \
#		${SETENV} SHELL=${PDKSH} ${PDKSH} ./bin/package test

.include "../../mk/bsd.pkg.mk"