aboutsummaryrefslogtreecommitdiffstats
path: root/games/linux-doom3-demo/Makefile
blob: 9995c4be7162627ca0f1bf7fc256b28ee17a6116 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# New ports collection makefile for:    doom3-demo
# Date created:         31 Mar 2005
# Whom:             Jean-Yves Lefort <jylefort@brutele.be>
#
# $FreeBSD$
#

PORTNAME=   doom3-demo
PORTVERSION=    1.1.1286
PORTREVISION=   1
CATEGORIES= games linux
MASTER_SITES=   http://www.hup.hu/~trey/DOOM3/ \
        http://darkstar.ist.utl.pt/pub/games/ \
        ftp://ftp.headoff.com/GameDemos/Doom3/ \
        IDSOFTWARE/doom3/linux
PKGNAMEPREFIX=  linux-
DISTNAME=   doom3-linux-${PORTVERSION}-demo.x86
EXTRACT_SUFX=   .run

MAINTAINER= jylefort@FreeBSD.org
COMMENT=    DOOM III demo for Linux

ONLY_FOR_ARCHS= i386 amd64
USE_XLIB=   yes
USE_LINUX=  yes
NO_PACKAGE= Distfile size is 462MB, set FORCE_PACKAGE if you really want to build this package
NO_CDROM=   Redistribution is limited, see license
NO_BUILD=   yes
NO_WRKSUBDIR=   yes
DOOMDIR=    ${PREFIX}/lib/${PKGNAMEPREFIX}${PORTNAME}
DOCSDIR=    ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}

SUB_FILES=  doom3-demo
SUB_LIST=   DOOMDIR="${DOOMDIR}"

.include <bsd.port.pre.mk>

.if ${X_WINDOW_SYSTEM:L} != xfree86-3
.if defined(WITH_NVIDIA_GL)
RUN_DEPENDS+=   ${LINUXBASE}/usr/lib/libGL.so.1:${PORTSDIR}/x11/nvidia-driver
.else
RUN_DEPENDS+=   ${LINUXBASE}/usr/X11R6/lib/libGL.so.1:${PORTSDIR}/graphics/linux_dri
.endif
.else
RUN_DEPENDS+=   ${LINUXBASE}/lib/libGL.so.1:${PORTSDIR}/graphics/linux_glx
.endif

do-extract:
    @${MKDIR} ${WRKSRC}
    @cd ${WRKSRC} && ${TAIL} -c +8767 ${_DISTDIR}/${DISTFILES} | ${TAR} zxf -

do-install:
    ${INSTALL_SCRIPT} ${WRKDIR}/doom3-demo ${PREFIX}/bin/${PKGNAMEPREFIX}doom3-demo

    ${MKDIR} ${DOOMDIR}/demo
    ${INSTALL_DATA} ${WRKSRC}/demo/demo00.pk4 ${DOOMDIR}/demo

    ${INSTALL_PROGRAM} ${WRKSRC}/bin/Linux/x86/doom.x86 ${DOOMDIR}
.for f in gamex86.so
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOOMDIR}
    -${CHOWN} ${LIBOWN}:${LIBGRP} ${DOOMDIR}/${f}
    ${CHMOD} ${LIBMODE} ${DOOMDIR}/${f}
.endfor

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for f in License.txt README
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>