summaryrefslogtreecommitdiff
path: root/games/cube/Makefile
blob: 918ab42860443e72b92024b2939a8ab1d482c3aa (plain)
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
# $NetBSD: Makefile,v 1.5 2005/06/16 06:57:54 jlam Exp $

DISTNAME=	cube_2004_05_22
PKGNAME=	cube-20040522
PKGREVISION=	1
CATEGORIES=	games x11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=cube/}

MAINTAINER=	peter@pointless.nl
HOMEPAGE=	http://wouter.fov120.com/cube/
COMMENT=	Cube is a 3D First Person Shooter that uses OpenGL and SDL

BUILD_DEPENDS+=	unzip-[0-9]*:../../archivers/unzip

WRKSRC=		${WRKDIR}/cube
CUBE_SRC=	${WRKSRC}/source/src
CUBE_DATA=	${PREFIX}/share/cube

NO_CONFIGURE=	yes
USE_TOOLS+=	gmake

INSTALLATION_DIRS=	bin

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

post-patch:
	@${ECHO} '#define DATADIR "${CUBE_DATA}"' >> ${CUBE_SRC}/cube.h

do-build:
	@cd ${WRKSRC}/source/enet && ${SH} configure
	@cd ${CUBE_SRC} && ${GMAKE} all

pre-install:
	@${INSTALL_DATA_DIR} ${CUBE_DATA}/savegames

do-install:
	${INSTALL_PROGRAM} ${CUBE_SRC}/cube_client ${PREFIX}/bin
	${INSTALL_PROGRAM} ${CUBE_SRC}/cube_server ${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/autoexec.cfg ${CUBE_DATA}
	${CP} -Rp ${WRKSRC}/data ${CUBE_DATA}
	${CP} -Rp ${WRKSRC}/packages ${CUBE_DATA}

.include "../../audio/SDL_mixer/buildlink3.mk"
.include "../../devel/SDL/buildlink3.mk"
.include "../../graphics/SDL_image/buildlink3.mk"

.include "../../mk/bsd.pkg.mk"