ports/86185: [UPDATE] games/q3-paks: rewrite and rename to "quake3-data"

Alejandro Pulver alejandro at varnet.biz
Thu Sep 15 21:50:11 UTC 2005


>Number:         86185
>Category:       ports
>Synopsis:       [UPDATE] games/q3-paks: rewrite and rename to "quake3-data"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 15 21:50:10 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Alejandro Pulver
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
>Environment:





>Description:


Changes:
* Rename to "quake3-data" (also rename port directory).
* Install Quake III Arena and Quake III Team Arena updates and ask to put the 2 files from the original CDROM to complete the installation.
* Has an includable Makefile to set variables for other mods/clients.
* Take maintainership (this is a complete rewrite).


>How-To-Repeat:





>Fix:


--- quake3-data.diff begins here ---
diff -urN /usr/ports/games/q3-paks/Makefile quake3-data/Makefile
--- /usr/ports/games/q3-paks/Makefile	Wed Jun  2 04:05:07 2004
+++ quake3-data/Makefile	Thu Sep 15 16:06:59 2005
@@ -5,45 +5,52 @@
 # $FreeBSD: ports/games/q3-paks/Makefile,v 1.5 2004/06/02 07:05:07 demon Exp $
 #
 
-PORTNAME=	q3-paks
-PORTVERSION=	1.0
-CATEGORIES=	games linux
-MASTER_SITES=	#
-DISTFILES=	pak0.pk3
-DIST_SUBDIR=	q3-paks
-IGNOREFILES=	${ALLFILES}
-
-MAINTAINER=	nik at FreeBSD.org
-COMMENT=	Quake 3 for Linux .pk3 files
-
-# Make this a BUILD_ rather than a RUN_DEPEND so that it can create the
-# directory hierarchy for us.
-RUN_DEPENDS=	${LINUXBASE}/usr/games/quake3/q3ded:${PORTSDIR}/games/q3server
-
-PLIST_FILES=	usr/games/quake3/baseq3/pak0.pk3
-ONLY_FOR_ARCHS=	i386
-USE_LINUX_PREFIX=	yes
-EXTRACT_ONLY=	# Don't extract anything
-STRIP=
+PORTNAME=	data
+DISTVERSION=	1.32b-3
+CATEGORIES=	games
+MASTER_SITES=	ftp://ftp.idsoftware.com/idstuff/quake3/linux/
+DISTNAME=	linuxq3apoint-${DISTVERSION}.x86
+EXTRACT_SUFX=	.run
+
+MAINTAINER=	alejandro at varnet.biz
+COMMENT=	Quake III Arena data files
+
+NO_BUILD=	yes
+NO_WRKSUBDIR=	yes
+
+OPTIONS=	TEAMARENA "Install Quake III Team Arena data files" on
+
+SUB_FILES=	pkg-message
+PKGMESSAGE=	${WRKDIR}/pkg-message
+
+do-extract:
+	@${RM} -rf ${WRKDIR}
+	@${MKDIR} ${WRKDIR}
+	@cd ${WRKDIR} && ${TAIL} +356 ${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} | \
+		${TAR} zxf - >/dev/null
 
-GAMEDIR=	${PREFIX}/usr/games/quake3/
+.include "Makefile.include"
 
 .include <bsd.port.pre.mk>
 
-.for file in ${DISTFILES}
-.if !exists(${DISTDIR}/q3-paks/${file})
-IGNORE=You must manually copy all the .pk3 files from the baseq3/ directory of an installed version of the game to the ${DISTDIR}/q3-paks directory and then run make again.
+.if defined(WITH_TEAMARENA)
+PLIST_SUB+=	TEAMARENA=""
+.else
+PLIST_SUB+=	TEAMARENA="@comment "
 .endif
-.endfor
-
-# Do nothing for the build.  Don't set NO_BUILD because of the earlier
-# BUILD_DEPENDS
-do-build:
 
 do-install:
-	${MKDIR} ${GAMEDIR}/baseq3
-.for file in ${DISTFILES}
-	${INSTALL_DATA} ${DISTDIR}/q3-paks/${file} ${GAMEDIR}/baseq3
-.endfor
+	@${MKDIR} ${DATADIR}
+	@${CP} -R ${WRKSRC}/baseq3 ${DATADIR}
+	@${MKDIR} ${PREFIX}/share/pixmaps
+	@${INSTALL_DATA} ${WRKSRC}/quake3.xpm ${PREFIX}/share/pixmaps
+.if defined(WITH_TEAMARENA)
+	@${CP} -R ${WRKSRC}/missionpack ${DATADIR}
+.endif
+
+post-install:
+	@${ECHO_CMD}
+	@${CAT} ${PKGMESSAGE}
+	@${ECHO_CMD}
 
 .include <bsd.port.post.mk>
diff -urN /usr/ports/games/q3-paks/Makefile.include quake3-data/Makefile.include
--- /usr/ports/games/q3-paks/Makefile.include	Wed Dec 31 21:00:00 1969
+++ quake3-data/Makefile.include	Wed Sep 14 19:21:50 2005
@@ -0,0 +1,44 @@
+# Makefile for defining variables used by other Quake III Arena related ports.
+
+# Package name prefix.
+
+Q3PKGNAMEPREFIX=quake3-
+
+.if ${PORTNAME} != "quake3"
+PKGNAMEPREFIX?=	${Q3PKGNAMEPREFIX}
+.endif
+
+# Dependency to "games/quake3-data".
+
+.if ${PORTNAME} != "data"
+RUN_DEPENDS+=	${Q3DIR}/baseq3/pak0.pk3:${PORTSDIR}/games/quake3-data
+.endif
+
+# Installation directories.
+
+PREFIX=		${LOCALBASE}
+Q3DIR=		${PREFIX}/share/quake3
+
+.if ${PORTNAME} == "data" || ${PORTNAME} == "quake3"
+DATADIR?=	${Q3DIR}
+.else
+DATADIR?=	${Q3DIR}/${PORTNAME}
+.endif
+
+DOCSDIR?=	${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
+
+PLIST_SUB+=	Q3DIR="${Q3DIR:S/${PREFIX}\///}"
+
+# Convert "dos" text files to "unix".
+
+.if defined(USE_ZIP)
+EXTRACT_BEFORE_ARGS=	-aqo
+.else
+USE_REINPLACE=	yes
+
+pre-patch:
+# remove trailing ^M
+	@${FIND} -E ${WRKSRC} -type f \
+		-iregex ".*\.(bat|cfg|gam|htm|html|inf|ini|lst|sc|scr|txt|url)" \
+		-exec ${REINPLACE_CMD} -e "s|`${ECHO_CMD} -e '\r'`$$||" {} \;
+.endif
diff -urN /usr/ports/games/q3-paks/distinfo quake3-data/distinfo
--- /usr/ports/games/q3-paks/distinfo	Wed Dec 31 21:00:00 1969
+++ quake3-data/distinfo	Thu Sep 15 16:15:13 2005
@@ -0,0 +1,2 @@
+MD5 (linuxq3apoint-1.32b-3.x86.run) = c71fdddccb20e8fc393d846e9c61d685
+SIZE (linuxq3apoint-1.32b-3.x86.run) = 30923961
diff -urN /usr/ports/games/q3-paks/files/pkg-message.in quake3-data/files/pkg-message.in
--- /usr/ports/games/q3-paks/files/pkg-message.in	Wed Dec 31 21:00:00 1969
+++ quake3-data/files/pkg-message.in	Thu Sep 15 16:17:36 2005
@@ -0,0 +1,11 @@
+====================================================================
+
+To complete the installation of this port you need to copy the file
+"baseq3/pak0.pk3" from the original Quake III Arena distribution to
+"%%DATADIR%%/baseq3".
+
+If you have the expansion pack then you have to copy the file
+"missionpack/pak0.pk3" from the original Quake III Team Arena
+distribution to "%%DATADIR%%/missionpack".
+
+====================================================================
diff -urN /usr/ports/games/q3-paks/pkg-descr quake3-data/pkg-descr
--- /usr/ports/games/q3-paks/pkg-descr	Sat Mar  2 19:17:36 2002
+++ quake3-data/pkg-descr	Tue Sep  6 20:24:57 2005
@@ -1,7 +1,7 @@
-Quake 3 for Linux .pk3 files
+Quake III Arena data files.
 
-This port encapsulates the .pk3 files for Quake 3 that are used to complete
-the installation of the game (including the dedicated server).
+This port installs the data files needed to run Quake III Arena. It also uses
+the update, and has an option to install Quake III Team Arena data files.
 
 You still need to have a legitimate copy of the game in order to obtain
 the .pk3 files.
diff -urN /usr/ports/games/q3-paks/pkg-plist quake3-data/pkg-plist
--- /usr/ports/games/q3-paks/pkg-plist	Wed Dec 31 21:00:00 1969
+++ quake3-data/pkg-plist	Thu Sep 15 16:09:41 2005
@@ -0,0 +1,16 @@
+%%DATADIR%%/baseq3/pak1.pk3
+%%DATADIR%%/baseq3/pak2.pk3
+%%DATADIR%%/baseq3/pak3.pk3
+%%DATADIR%%/baseq3/pak4.pk3
+%%DATADIR%%/baseq3/pak5.pk3
+%%DATADIR%%/baseq3/pak6.pk3
+%%DATADIR%%/baseq3/pak7.pk3
+%%DATADIR%%/baseq3/pak8.pk3
+%%TEAMARENA%%%%DATADIR%%/missionpack/pak1.pk3
+%%TEAMARENA%%%%DATADIR%%/missionpack/pak2.pk3
+%%TEAMARENA%%%%DATADIR%%/missionpack/pak3.pk3
+share/pixmaps/quake3.xpm
+ at unexec rmdir %D/share/pixmaps 2>/dev/null || true
+%%TEAMARENA%%@unexec rmdir %D/%%DATADIR%%/missionpack 2>/dev/null || true
+ at dirrm %%DATADIR%%/baseq3
+ at unexec rmdir %D/%%DATADIR%% >/dev/null 2>&1 || echo "If you are permanently removing this port, you should remove any configuration files, data files, and mods left in %D/%%DATADIR%%." | fmt
--- quake3-data.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list