blob: 5da5ea5c2c27b4518f459631e86dd7219cdaa10c (
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# New ports collection makefile for: linux-ut
# Date created: 7 Jan 2006
# Whom: Sean Farley <sean-freebsd@farley.org>
#
# $FreeBSD$
#
PORTNAME= linux-ut
PORTVERSION= 436
CATEGORIES= games linux
MASTER_SITES= http://liflg.org/?what=dl&catid=6&gameid=51&filename=
DISTFILES= unreal.tournament_436-multilanguage.run \
unreal.tournament.official.bonus.pack.collection.run
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= sean-freebsd@farley.org
COMMENT= Unreal Tournament for Linux
# A redirect will occur, so have fetch save the file with the correct name.
FETCH_CMD= /usr/bin/fetch -Rr
FETCH_BEFORE_ARGS= -o $${file}
ONLY_FOR_ARCHS= i386
USE_LINUX= yes
USE_XLIB= yes
NO_BUILD= yes
NO_PACKAGE= Distribution is 340MB\; set FORCE_PACKAGE if you really want\
to build this package
RESTRICTED= Redistribution is limited, see license
IS_INTERACTIVE= yes
WRKSRC= ${WRKDIR}/${PKGNAME}
do-extract:
@${MKDIR} ${WRKSRC}
.for file in ${DISTFILES}
@cd ${WRKSRC} &&\
${SED} -e '1,/exit $$res/d' ${_DISTDIR}/${file} | ${TAR} zxf -
.endfor
@${MV} ${WRKSRC}/bin/Linux/x86/ucc ${WRKSRC}/bin/.
post-patch:
@${REINPLACE_CMD} -e "s|\(UT_DATA_PATH=\).*|\1\"${DATADIR}/System\"|"\
${WRKSRC}/bin/ucc
@${REINPLACE_CMD} -e "s|^\(GAME_DIR=\).*|\1\"${DATADIR}\"|"\
-e "/ll=/{N;d;}" ${WRKSRC}/bin/ut
# Installation steps performed:
# - Verify path to CD content.
# - Verify CD was correctly mounted. -b option may be needed to mount it.
# - Copy desired content off of CD to drive. Windows files left behind.
# - Extract files from Linux patch minus various language files (necessary?).
# - Extract bonus pack.
# - Patch .ini file to use absolute paths to content.
# - Apply Linux patch.
# - Install scripts and README's.
# - Set permissions on files and directories.
do-install:
.if !defined(CDROM_MOUNT)
@${ECHO_CMD} "${PKGNAME} requires CDROM_MOUNT set to mount point of CD"
@${FALSE}
.endif
.if !exists(${CDROM_MOUNT}/NetGamesUSA.com)
@${ECHO_CMD} \
"NetGamesUSA.com not found on CD; try mounting with -b option"
@${FALSE}
.endif
@${ECHO_CMD} "Installing data from CD"
@${MKDIR} ${DATADIR}
.for dir in Help Logs Maps Music NetGamesUSA.com Sounds System Textures Web
@cd ${CDROM_MOUNT} &&\
${TAR} c --exclude '*.ICD' --exclude '*.bat' --exclude '*.dll'\
--exclude '*.est*' --exclude '*.[Ee][Xx][Ee]'\
--exclude '*.frt*' --exclude '*.ico' --exclude '*.itt*'\
--exclude '*.mpi' --exclude '*.url' --exclude 'D3D*'\
--exclude 'mplay*' -f - ${dir} |\
${TAR} x -C ${DATADIR} -f -
.endfor
@${RM} ${DATADIR}/Logs/delete_me.txt
@${ECHO_CMD} "Installing v${PORTVERSION} patch files"
.for tarfile in Credits NetGamesUSA.com OpenGL.ini data
@${TAR} zox -C ${DATADIR} --exclude '*.exe'\
-f ${WRKSRC}/${tarfile}.tar.gz
.endfor
@${ECHO_CMD} "Installing bonus pack"
.for ndx in 1 2 3 4
@${TAR} jox -C ${DATADIR} -f ${WRKSRC}/bp${ndx}.tar.bz2
.endfor
@${SED} -i "" -e "s|\.\.\\\\|${DATADIR}\\\\|" -e "s|\.\./|${DATADIR}/|"\
${DATADIR}/System/UnrealTournament.ini
@${ECHO_CMD} "Applying v${PORTVERSION} patch"
@${WRKSRC}/setup.data/bin/FreeBSD/x86/loki_patch\
${WRKSRC}/setup.data/patch.dat ${DATADIR}
.for script in ucc ut
@${INSTALL_SCRIPT} ${WRKSRC}/bin/${script} ${PREFIX}/bin/
.endfor
.for datafile in README README.Loki README.bonus.pack.collection
@${INSTALL_DATA} ${WRKSRC}/${datafile} ${DATADIR}
.endfor
@${ECHO_CMD} "Setting permissions"
@${FIND} ${DATADIR} -type d -print0 | ${XARGS} -0 ${CHMOD} ${BINMODE}
@${FIND} ${DATADIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${NOBINMODE}
@${FIND} ${DATADIR} \( -name "*.so" -o -name "lib*.so*" \) -print0 |\
${XARGS} -0 ${CHMOD} ${BINMODE}
.for exec in ucc-bin ut-bin
@${CHMOD} ${BINMODE} ${DATADIR}/System/${exec}
.endfor
@${ECHO_CMD} "Install complete"
.include <bsd.port.mk>
|