aboutsummaryrefslogtreecommitdiffstats
path: root/games/cube/Makefile
blob: 6142ba21535030043031327a5da4e61764d1b188 (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
# New ports collection makefile for:    cube
# Date created:        17 October 2002
# Whom:                Arjan van Leeuwen
#
# $FreeBSD$
#

PORTNAME=   cube
PORTVERSION=    2002.10.20
CATEGORIES= games
MASTER_SITES=   http://tunes.org/~eihrul/ \
        http://www.idi.ntnu.no/~jonasf/cube/
DISTNAME=   ${PORTNAME}_${PORTVERSION:S/./_/:S/./_/}

MAINTAINER= avleeuwen@piwebs.com
COMMENT=    An OpenGL 3D First Person Shooter game

LIB_DEPENDS=    SDL_image.10:${PORTSDIR}/graphics/sdl_image \
        SDL_mixer.2:${PORTSDIR}/audio/sdl_mixer

USE_ZIP=    yes
USE_GMAKE=  yes

BUILD_WRKSRC=   ${WRKSRC}/source/src
EXTRACT_BEFORE_ARGS=-q -a
EXTRACT_AFTER_ARGS=-d ${WRKDIR}/${DISTNAME}/
DATADIR=    ${PREFIX}/share/cube

post-extract:
    @ unzip -a -q -o ${WRKSRC}/source/${DISTNAME}_src.zip -d ${WRKSRC}/source/

post-patch:
    ${ECHO_CMD} '#define DATADIR "${DATADIR}"' >> ${BUILD_WRKSRC}/cube.h

do-install:
    ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/cube_client ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/cube_server ${PREFIX}/bin
    ${MKDIR} ${DATADIR}/savegames
    ${CP} -Rp ${WRKSRC}/packages ${DATADIR}
    ${CP} -Rp ${WRKSRC}/data ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/autoexec.cfg ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/servers.cfg ${DATADIR}

.include <bsd.port.mk>