Add files from parent branch HEAD:
[pkgsrcv2.git] / shells / ast-ksh / Makefile.common
1 # $NetBSD: Makefile.common,v 1.24 2009/06/05 23:57:47 zafer Exp $
2
3 DISTNAME=       ast-ksh-${ASTKSH_VERSION}
4 PKGNAME=        ast-ksh-${ASTKSH_VERSION:S/-//g}
5 PKGREVISION=    1
6 CATEGORIES=     shells
7 MASTER_SITES=   http://ftp.ntua.gr/pub/linux/openpkg/sources/DST/ksh/ \
8                 ftp://ftp.ntua.gr/pub/linux/openpkg/sources/DST/ksh/
9 DISTFILES=      INIT.${ASTKSH_VERSION}.tgz ast-ksh.${ASTKSH_VERSION}.tgz
10
11 MAINTAINER=     pkgsrc-users@NetBSD.org
12 HOMEPAGE=       http://www.kornshell.com/
13 COMMENT=        Official AT&T release of KornShell 93
14
15 NOT_FOR_PLATFORM=       Interix-*-* # taking nearly a day to build and crash!
16
17 CONFLICTS=      static-ast-ksh-[0-9]*
18 KSH93_MAKEFLAGS=
19
20 RESTRICTED=     Terms for redistribution are not yet clear.
21 NO_BIN_ON_CDROM=${RESTRICTED}
22 NO_BIN_ON_FTP=  ${RESTRICTED}
23 NO_SRC_ON_CDROM=${RESTRICTED}
24 NO_SRC_ON_FTP=  ${RESTRICTED}
25
26 ASTKSH_VERSION= 2006-02-14
27
28 WRKSRC=         ${WRKDIR}
29 MAKE_FLAGS+=    CC=${CC:Q} CCFLAGS=${CFLAGS:M*:Q}
30
31 .include "../../mk/bsd.prefs.mk"
32
33 .if ${OPSYS} == "NetBSD"
34 PDKSH=          /bin/ksh
35 .endif
36
37 PKG_SHELL=      bin/ksh93
38
39 INSTALLATION_DIRS=      bin ${PKGMANDIR}/man1
40
41 # ${KSH93_MAKEFLAGS} is set as "LDFLAGS=-static" only when built as a
42 # static binary.
43 #
44 # XXX Note that 'make' here is not an executable command name, but a target
45 # name which the ./bin/package script uses.
46 do-build:
47         @cd ${WRKSRC:Q} && \
48                 ${SETENV} SHELL=${PDKSH:Q} \
49                         ${PDKSH:Q} ./bin/package make ${KSH93_MAKEFLAGS}
50
51 do-install:
52         @set -e;                                                        \
53         arch=`${WRKSRC}/bin/package host`;                              \
54         ${INSTALL_PROGRAM} ${WRKSRC}/arch/"$${arch}"/bin/ksh            \
55                 ${DESTDIR}${PREFIX}/bin/ksh93;                          \
56         ${INSTALL_MAN} ${WRKSRC}/arch/"$${arch}"/man/man1/sh.1  \
57                 ${DESTDIR}${PREFIX}/man/man1/ksh93.1
58
59 # Part of regression test
60 do-test:
61         @cd ${WRKSRC:Q}/src/cmd/ksh93/tests && \
62                 ${SETENV} SHELL=${PREFIX:Q}/bin/ksh93 ${PREFIX:Q}/bin/ksh93 shtests
63 # XXX Their 'test' target needs nmake (Korn's another tool)
64 #       @cd ${WRKSRC}; \
65 #               ${SETENV} SHELL=${PDKSH} ${PDKSH} ./bin/package test