aboutsummaryrefslogtreecommitdiffstats
path: root/games/evilfinder/Makefile
blob: cd97b740fd87e2c2b63273ba7c329fd0c8301af4 (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
# New ports collection makefile for:    evilfinder
# Date created:             11 June 2003
# Whom:                 Adam Weinberger <adamw@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   evilfinder
PORTVERSION=    1.00
CATEGORIES= games
MASTER_SITES=   http://lcamtuf.coredump.cx/
DISTNAME=   ef
EXTRACT_SUFX=   .tgz

MAINTAINER= ports@FreeBSD.org
COMMENT=    Numerologically determine the evilness of things

WRKSRC=     ${WRKDIR}/${PORTNAME}

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_WRAPPER)
RUN_DEPENDS+=   lynx:${PORTSDIR}/www/lynx
PLIST_SUB+= WRAPPER=""
.else
PLIST_SUB+= WRAPPER="@comment "
.endif

USE_REINPLACE=  yes

pre-everything::
.if !defined(WITHOUT_WRAPPER)
    @${ECHO_MSG} "********************************************"
    @${ECHO_MSG} "Define WITHOUT_WRAPPER to build without the"
    @${ECHO_MSG} "\"evilfinder\" wrapper, which makes the port"
    @${ECHO_MSG} "a web-oriented application."
    @${ECHO_MSG} "********************************************"
.endif

post-patch:
    @${REINPLACE_CMD} -e '/^CFLAGS/d' ${WRKSRC}/Makefile
    @${REINPLACE_CMD} -e "s|evilnumbers.dat|${DATADIR}/evilnumbers.dat|; \
        s|./shuffle|${PREFIX}/bin/shuffle|" \
        ${WRKSRC}/ef.c
.if !defined(WITHOUT_WRAPPER)
    @${SED} -e "s|%%PREFIX%%|${PREFIX}|; \
        s|%%LOCALBASE%%|${LOCALBASE}|" \
        ${FILESDIR}/evilfinder > ${WRKSRC}/evilfinder
.endif

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/ef ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/shuffle ${PREFIX}/bin
    ${MKDIR} ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/evilnumbers.dat ${DATADIR}
.if !defined(WITHOUT_WRAPPER)
    ${INSTALL_SCRIPT} ${WRKSRC}/evilfinder ${PREFIX}/bin
.endif
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

.include <bsd.port.post.mk>