aboutsummaryrefslogtreecommitdiffstats
path: root/games/wolfpack/Makefile
blob: 1d327e67cc178f1c62394932be27ac1cfba2f07d (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
# Created by: Daniel O'Connor <darius@dons.net.au>
# $FreeBSD$

PORTNAME=   wolfpack
PORTVERSION=    4.4.0
CATEGORIES= games
MASTER_SITES=   SF/empserver/${DISTNAME}
DISTNAME=   empire-${PORTVERSION}

MAINTAINER= johans@FreeBSD.org
COMMENT=    Long term multiplayer strategy game

LICENSE=    GPLv3+

MAKEFILE=   GNUmakefile
USES=       gmake groff perl5
USE_PERL5=  build
GNU_CONFIGURE=  yes
BINDIR=     lib/${PORTNAME}
CONFIGURE_ARGS= --bindir=${PREFIX}/${BINDIR} --sbindir=${PREFIX}/${BINDIR}

CONFLICTS_INSTALL=  empire-[0-9]*

USERS=      wolfpack
GROUPS=     wolfpack

USE_RC_SUBR=    wolfpack
SUB_FILES+= pkg-message

.include <bsd.port.pre.mk>

post-patch:
    ${REINPLACE_CMD} -e '/^econfig/,/^$$/s|/empire|/${PORTNAME}|' \
        ${WRKSRC}/Make.mk ${WRKSRC}/sources.mk
.if ${ARCH} == "sparc64"
    ${REINPLACE_CMD} -e '/ucontext\.h/ { h; s|ucontext|sys/types|; G; }' \
        ${WRKSRC}/src/lib/lwp/lwpint.h
.endif

post-install:
    ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DATADIR}
    ${LN} -s ../${BINDIR}/emp_server ${STAGEDIR}${PREFIX}/bin/emp_server
    ${LN} -s ../${BINDIR}/empire ${STAGEDIR}${PREFIX}/bin/emp_client
    ${MKDIR} ${STAGEDIR}${ETCDIR}
    ${STAGEDIR}${PREFIX}/lib/wolfpack/pconfig > \
        ${STAGEDIR}${ETCDIR}/econfig.sample

.include <bsd.port.post.mk>