aboutsummaryrefslogtreecommitdiffstats
path: root/games/legends/Makefile
blob: 736f3c8bef4bb4bd4d2beb482d137a7bd4d8d714 (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
# Created by: alepulver
# $FreeBSD$

PORTNAME=   legends
PORTVERSION=    0.4.1.43
PORTREVISION=   2
CATEGORIES= games
MASTER_SITES=   http://legendsthegame.net/files/:game \
        http://legendsthegame.net/files/maps/:maps
DISTNAME=   ${PORTNAME}_linux_gui-${PORTVERSION}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}:game \
        ${MAP_PACK}:maps
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_SUFX=   .run

MAINTAINER= ports@FreeBSD.org
COMMENT=    Fast-paced first-person-perspective online multiplayer game

RUN_DEPENDS=    bash:shells/bash

USES=       linux makeself
USE_LINUX=  dri
NO_BUILD=   yes
NO_WRKSUBDIR=   yes
DATADIR=    ${PREFIX}/lib/${PORTNAME}

# Standard map pack used in official servers.
MAP_PACK=   BTMappack-1.05.unf
PLIST_SUB=  MAP_PACK="${MAP_PACK}"

OPTIONS_DEFINE= DOCS

post-extract:
    @cd ${WRKSRC} && ${TAR} xf legends.tar

post-patch:
    @${REINPLACE_CMD} -e 's|#!/bin/bash|#!${LOCALBASE}/bin/bash|; \
        s|`dirname $$0`|${DATADIR}|; s|./LinLegends|exec &|; s| &$$||' \
        ${WRKSRC}/bin/runlegends

do-install:
    @${MKDIR} ${STAGEDIR}${DATADIR}
    cd ${WRKSRC} && \
        ${INSTALL_PROGRAM} LinLegends lindedicated *.so* ${STAGEDIR}${DATADIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/bin/runlegends ${STAGEDIR}${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/legends.ico ${STAGEDIR}${PREFIX}/share/pixmaps
    ${LN} -sf ${DATADIR}/runlegends ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.for f in common legends main.cs show
    ${CP} -r ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}
.endfor
    ${INSTALL_DATA} ${DISTDIR}/${MAP_PACK} ${STAGEDIR}${DATADIR}/legends
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/*.txt ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>