aboutsummaryrefslogtreecommitdiffstats
path: root/games/ptools/Makefile
blob: 8c0ed05c5fe5ecee39c6e0273e20355b2d1609ed (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
# New ports collection makefile for:    ptools
# Date created:             2008-01-15
# Whom:                 alepulver
#
# $FreeBSD$
#

PORTNAME=   ptools
PORTVERSION=    1.1
CATEGORIES= games
MASTER_SITES=   http://www.koth.org/pmars/:koth \
        http://www.infionline.net/~wtnewton/corewar/:corestep
DISTFILES=  ${PORTNAME}${PORTVERSION:S/.//}.zip:koth \
        pmars08s.zip:koth \
        p3-2.pl:koth \
        corestep.c:corestep
EXTRACT_ONLY=   ${DISTFILES:C/:[[:alpha:]]+$//:N*.pl:N*.c}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Accessory programs for pMARS (Core War simulator)

USE_ZIP=    yes
USE_PERL5_RUN=  yes
MAKEFILE=   makefile.ptools
ALL_TARGET= mopt mts pname
NO_WRKSUBDIR=   yes

MAN6=       ptools-mopt.6 ptools-mts.6

post-build:
    (${ECHO_CMD} "#!${PERL}"; ${CAT} ${DISTDIR}/p3-2.pl) \
        > ${WRKSRC}/p3-2.pl
    ${CC} ${CFLAGS} -o ${WRKSRC}/corestep ${DISTDIR}/corestep.c -lm

do-install:
.for f in corestep mopt mts pname
    ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin/${PORTNAME}-${f}
.endfor
    ${INSTALL_SCRIPT} ${WRKSRC}/p3-2.pl ${PREFIX}/bin/${PORTNAME}-p3-2
.for f in mopt.6 mts.6
    ${INSTALL_MAN} ${WRKSRC}/${f} ${MAN6PREFIX}/man/man6/${PORTNAME}-${f}
.endfor
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
. for f in mopt.doc mts.doc pname.doc readme.ptools
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
. endfor
.endif

.include <bsd.port.mk>