aboutsummaryrefslogtreecommitdiffstats
path: root/games/linux-quake4-demo/Makefile
blob: 3daa11a174a1464061f99f133799210b07682e0a (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
# New ports collection makefile for:    linux-quake4-demo
# Date created:             19 Jul 2006
# Whom:                 alepulver
#
# $FreeBSD$
#

PORTNAME=   quake4
PORTVERSION=    1.0
PORTREVISION=   1
CATEGORIES= games linux
MASTER_SITES=   ${MASTER_SITE_IDSOFTWARE:S/$/:id/} \
        ${MASTER_SITE_GENTOO:S/$/:gentoo/}
MASTER_SITE_SUBDIR= quake4/demo/:id distfiles/:gentoo
PKGNAMEPREFIX=  linux-
PKGNAMESUFFIX=  -demo
DISTNAME=   ${PORTNAME}-${PKGNAMEPREFIX}${PORTVERSION}${PKGNAMESUFFIX}.x86
EXTRACT_SUFX=   .run
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}:id,gentoo

MAINTAINER= alepulver@FreeBSD.org
COMMENT=    Quake 4 for Linux Demo

RUN_DEPENDS=    ${LINUXBASE}/usr/lib/libSDL-1.2.so.0:${PORTSDIR}/devel/linux-sdl12

ONLY_FOR_ARCHS= i386 amd64
USE_LINUX=  yes
NO_WRKSUBDIR=   yes
NO_CDROM=   Redistribution is limited, see license
NO_PACKAGE= Package will be 337MB, set FORCE_PACKAGE if you really want it

Q4DIR=      lib/${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
PLIST_SUB=  Q4DIR="${Q4DIR}"

do-extract:
    @${RM} -rf ${WRKDIR}
    @${MKDIR} ${WRKDIR}
    @cd ${WRKDIR} && ${TAIL} +376 ${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} | \
        ${TAR} zxf -

do-build:
.for FILE in quake4 q4ded
    @${SED} \
        -e 's|@Q4DIR@|${PREFIX}/${Q4DIR}|' \
        -e 's|@APP@|${FILE}.x86|' \
        ${FILESDIR}/run.sh.in > ${WRKSRC}/${PKGNAMEPREFIX}${FILE}.sh
.endfor

do-install:
    ${MKDIR} ${PREFIX}/${Q4DIR}/q4base
.for FILE in quake4 q4ded
    ${INSTALL_SCRIPT} ${WRKSRC}/${PKGNAMEPREFIX}${FILE}.sh \
        ${PREFIX}/bin/${PKGNAMEPREFIX}${FILE}-demo
    ${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/x86/${FILE}.x86 \
        ${PREFIX}/${Q4DIR}
.endfor
    ${INSTALL_DATA} ${WRKSRC}/q4base/* ${PREFIX}/${Q4DIR}/q4base

.include <bsd.port.mk>