aboutsummaryrefslogtreecommitdiffstats
path: root/shells/mksh/Makefile
blob: 96f52d0b1ca87de230bc2d6e1f6f1a8ba55f29f0 (plain) (blame)
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
# Ports collection makefile for:    mksh
# Date created:             2006-06-24
# Whom:                 Andreas Kohn <andreas@syndrom23.de>
#
# $FreeBSD$
#

PORTNAME=       mksh
PORTVERSION=        R33b
CATEGORIES=     shells
MASTER_SITES=       http://www.mirbsd.org/MirOS/dist/mir/mksh/ \
            http://pub.allbsd.org/MirOS/dist/mir/mksh/
DISTFILES=      ${PORTNAME}-${DISTVERSION}.cpio.gz

MAINTAINER=     miwi@FreeBSD.org
COMMENT=        A MirBSD enhanced shell based on pdksh

WRKSRC=         ${WRKDIR}/${PORTNAME}

MAN1=           mksh.1
PLIST_FILES=        bin/mksh share/examples/mksh/dot.mkshrc
PLIST_DIRS=     share/examples/mksh

PKGINSTALL=     pkg-install
PKGDEINSTALL=       pkg-deinstall

.include <bsd.port.pre.mk>

do-extract:
    ${MKDIR} ${WRKDIR}
    cd ${WRKDIR} && \
        ${GZCAT} ${DISTDIR}/${DISTFILES} | ${CPIO} -id

do-build:
    cd ${WRKSRC} && CFLAGS="${CFLAGS}" CC="${CC}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" SHELL=${SH} ${SH} ${WRKSRC}/Build.sh -q -r

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/mksh ${PREFIX}/bin
    ${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/dot.mkshrc ${EXAMPLESDIR}
    ${INSTALL_MAN} ${WRKSRC}/mksh.1 ${MANPREFIX}/man/man1

pre-install:
    @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" \
        ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

post-install:
    @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" \
        ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <bsd.port.post.mk>