aboutsummaryrefslogtreecommitdiffstats
path: root/shells/bush/Makefile
blob: adad5cd4a9100496c3352537ad873e0f3829c03e (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:    bush
# Date created:             20 December 2004
# Whom:                 Thierry Thomas <thierry@pompo.net>
#
# $FreeBSD$
#

PORTNAME=       bush
PORTVERSION=        1.0.1
CATEGORIES=     shells
MASTER_SITES=       http://www.pegasoft.ca/downloads/   \
            http://66.11.182.223/downloads/
EXTRACT_SUFX=       -src.tgz

MAINTAINER=     ports@FreeBSD.org
COMMENT=        The Business Shell

BUILD_DEPENDS=      gnatmake:${PORTSDIR}/lang/gnat  \
            bash:${PORTSDIR}/shells/bash
USE_PGSQL=      yes

HAS_CONFIGURE=      yes
USE_GMAKE=      yes
MAKE_ARGS=      GMAKE=${GMAKE} CPUTYPE=${CPUTYPE}   \
            PTHREAD_LIBS=${PTHREAD_LIBS}
MAKEFILE=       GNUmakefile
USE_MYSQL=      yes
BROKEN_WITH_MYSQL=  323
USE_REINPLACE=      yes

MAN1=           bush.1

PORTDOCS=       *

BASH2FIX=       examples/benchmark.bash src/testsuite/test.sh

pre-build:
.for FILE in ${BASH2FIX}
    @${REINPLACE_CMD} -e "s|/bin/bash|${LOCALBASE}/bin/bash|" ${WRKSRC}/${FILE}
.endfor

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/src/bush ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/src/bush.1 ${MANPREFIX}/man/man1
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
    ${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.endif

post-install:
    @${ECHO_CMD} ${PREFIX}/bin/bush >> /etc/shells
    @${ECHO_MSG} "Updating /etc/shells"
    @${CP} /etc/shells /etc/shells.bak
    @(${GREP} -v ${PREFIX}/bin/bush /etc/shells.bak ; \
      ${ECHO_CMD} ${PREFIX}/bin/bush) > /etc/shells
    @${RM} /etc/shells.bak

.if defined(MAINTAINER_MODE)
test:   build
    @(cd ${BUILD_WRKSRC} && \
    ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test)
.endif

.include <bsd.port.mk>