aboutsummaryrefslogtreecommitdiffstats
path: root/games/linux-nwnclient/Makefile
blob: 4fc4b98f2e0b8d653a247728e85a4aab15503050 (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
# New ports collection makefile for:    linux_nwnclient
# Date created:         1 April 2003
# Whom:                 Erik Olson <erikolson@olsonexpress.com>
#
# $FreeBSD$
#

PORTNAME=   nwnclient
PORTVERSION=    1.65
PORTREVISION=   1
CATEGORIES= games linux
MASTER_SITES=   http://content.bioware.com/neverwinternights/linux/${PORTVERSION:S/.//}/
PKGNAMEPREFIX=  linux-
DISTFILES=  nwclient129.tar.gz \
        linuxclientupdate1xxto${PORTVERSION:S/.//}eng.tar.gz

MAINTAINER= des@FreeBSD.org
COMMENT=    Neverwinter Nights Linux (x86) Client

RUN_DEPENDS=    ${LOCALBASE}/share/nwndata/NWNv129.txt:${PORTSDIR}/games/nwndata \
        ${LINUXBASE}/usr/X11R6/lib/libGL.so.1.2:${PORTSDIR}/graphics/linux_dri \
        ${LINUXBASE}/usr/lib/libSDL-1.2.so.0:${PORTSDIR}/devel/linux-sdl12

NO_BUILD=   yes
ONLY_FOR_ARCHS= i386
NWNDATADIR= ${LOCALBASE}/share/nwndata

PLIST_SUB+= NWNVERSION="${PORTVERSION:S/.//}"

do-extract:
    ${MKDIR} ${WRKSRC}
.for _distfile in ${DISTFILES}
    (cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
        ${DISTDIR}/${_distfile} ${EXTRACT_AFTER_ARGS})
.endfor
    ${RM} ${WRKSRC}/lib/libSDL* ${WRKSRC}/fixinstall ${WRKSRC}/nwn

do-configure:
    ${SED} -e 's|%%NWNDATADIR%%|${NWNDATADIR}|' \
        -e 's|%%NWNCLIENTDIR%%|${DATADIR}|' \
        <${FILESDIR}/nwn.sh >${WRKDIR}/nwn

do-install:
    ${MKDIR} ${DATADIR}
    (cd ${WRKSRC} && ${FIND} . -print | \
        ${CPIO} -pdmuv -R${SHAREOWN}:${SHAREGRP} ${DATADIR})
    ${LN} -s ${LINUXBASE}/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so \
        ${DATADIR}/lib/libstdc++-libc6.1-2.so.3
    ${FIND} ${DATADIR} -type d -print0 | ${XARGS} -0 chmod 0755
    ${FIND} ${DATADIR} -type f -print0 | ${XARGS} -0 chmod 0644
    (cd ${DATADIR} && ${CHMOD} 0755 dmclient nwmain nwserver)
    ${INSTALL_SCRIPT} ${WRKDIR}/nwn ${PREFIX}/bin/

.include <bsd.port.mk>