mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-08 06:48:28 +00:00
13d060a662
- Added new options (SMP and GERMANY support) - This ports install libSDL-1.2.id.so.0 and libstdc++.so.6. It's neccesary for correct running of linux-quake4. - Other tiny modifications. - Install libraries in a private directory and not in global ones [1]. - Fix IDSOFTWARE mirror sub-directory [1]. - Keep PORTEPOCH [1]. PR: ports/96789 Submitted by: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe> (maintainer) Reworked by: alepulver [1]
116 lines
3.2 KiB
Makefile
116 lines
3.2 KiB
Makefile
# New ports collection makefile for: Quake 4
|
|
# Date created: 21 Oct 2005
|
|
# Whom: Ed Schouten <ed@fxq.nl>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= quake4
|
|
PORTVERSION= 1.2.1
|
|
PORTEPOCH= 1
|
|
CATEGORIES= games linux
|
|
MASTER_SITES= ${MASTER_SITE_IDSOFTWARE:S|$|quake4/linux/|} \
|
|
${MASTER_SITE_GENTOO:S|$|distfiles/|}
|
|
PKGNAMEPREFIX= linux-
|
|
DISTNAME= ${PORTNAME}-${PKGNAMEPREFIX}${PORTVERSION}.x86
|
|
EXTRACT_SUFX= .run
|
|
|
|
MAINTAINER= acardenas@bsd.org.pe
|
|
COMMENT= Quake 4 for Linux
|
|
|
|
RUN_DEPENDS= ${LINUXBASE}/usr/lib/libSDL-1.2.so.0:${PORTSDIR}/devel/linux-sdl12
|
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
USE_X_PREFIX= yes
|
|
USE_LINUX= yes
|
|
NO_WRKSUBDIR= yes
|
|
Q4DIR= lib/${PORTNAME}
|
|
PLIST_SUB+= Q4DIR="${Q4DIR}" \
|
|
LINUXBASE="${LINUXBASE}"
|
|
SUB_FILES= pkg-message
|
|
|
|
OPTIONS= SMP "Install threaded version" on \
|
|
GERMANY "Germany version" off
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if !defined(WITHOUT_SMP)
|
|
PLIST_SUB+= SMP=""
|
|
.else
|
|
PLIST_SUB+= SMP="@comment "
|
|
.endif
|
|
|
|
do-extract:
|
|
@${RM} -rf ${WRKDIR}
|
|
@${MKDIR} ${WRKDIR}
|
|
@cd ${WRKDIR} && ${TAIL} +376 ${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} | \
|
|
${TAR} zxf -
|
|
|
|
do-build:
|
|
.for FILE in quake4 q4ded quake4smp
|
|
${BRANDELF} -t Linux ${WRKSRC}/bin/FreeBSD/x86/${FILE}.x86
|
|
|
|
# Startup scripts
|
|
@${SED} \
|
|
-e 's|@Q4DIR@|${PREFIX}/${Q4DIR}|' \
|
|
-e 's|@APP@|${FILE}.x86|' \
|
|
${FILESDIR}/run.sh.in > ${WRKSRC}/${FILE}.sh
|
|
.endfor
|
|
|
|
do-install:
|
|
# Executables
|
|
@${MKDIR} ${PREFIX}/${Q4DIR}
|
|
.for FILE in quake4 q4ded
|
|
${INSTALL_SCRIPT} ${WRKSRC}/${FILE}.sh ${PREFIX}/bin/${FILE}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/x86/${FILE}.x86 ${PREFIX}/${Q4DIR}
|
|
.endfor
|
|
|
|
.if !defined(WITHOUT_SMP)
|
|
${INSTALL_SCRIPT} ${WRKSRC}/quake4smp.sh ${PREFIX}/bin/quake4smp
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/x86/quake4smp.x86 ${PREFIX}/${Q4DIR}
|
|
.endif
|
|
# Libraries
|
|
.for FILE in libSDL-1.2.id.so.0 libstdc++.so.6
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/x86/${FILE} ${PREFIX}/${Q4DIR}
|
|
.endfor
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/FreeBSD/x86/libgcc_s.so.1 ${PREFIX}/${Q4DIR}
|
|
|
|
# Punkbuster
|
|
@${MKDIR} ${PREFIX}/${Q4DIR}/pb/htm
|
|
@${MKDIR} ${PREFIX}/${Q4DIR}/q4base
|
|
@cd ${WRKSRC} && \
|
|
${FIND} -E pb -type f -iregex ".*\.(so)" \
|
|
-exec ${INSTALL_DATA} "{}" "${PREFIX}/${Q4DIR}/{}" \; && \
|
|
${FIND} -E pb/htm -type f -iregex ".*\.(htm)" \
|
|
-exec ${INSTALL_DATA} "{}" "${PREFIX}/${Q4DIR}/{}" \;
|
|
# Q4base
|
|
@cd ${WRKSRC} && \
|
|
${FIND} -E q4base -type f -iregex ".*\.(cfg|scriptcfg|pk4)" \
|
|
-exec ${INSTALL_DATA} "{}" "${PREFIX}/${Q4DIR}/{}" \;
|
|
|
|
# All version (except germany) or only germany version
|
|
.if defined(WITH_GERMANY)
|
|
@cd ${WRKSRC}/germany && \
|
|
${FIND} -E q4base -type f -iregex ".*\.(pk4)" \
|
|
-exec ${INSTALL_DATA} "{}" "${PREFIX}/${Q4DIR}/{}" \;
|
|
.else
|
|
@cd ${WRKSRC}/us && \
|
|
${FIND} -E q4base -type f -iregex ".*\.(pk4)" \
|
|
-exec ${INSTALL_DATA} "{}" "${PREFIX}/${Q4DIR}/{}" \;
|
|
.endif
|
|
|
|
# Documentation
|
|
.if !defined (NOPORTDOCS)
|
|
@cd ${WRKSRC}/Docs && \
|
|
${FIND} * -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
|
|
${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
|
|
${INSTALL_DATA} ${WRKSRC}/License.txt ${DOCSDIR}/LICENSE && \
|
|
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README && \
|
|
${INSTALL_DATA} ${WRKSRC}/pb/PBEULA.txt ${DOCSDIR}/PBEULA
|
|
.endif
|
|
|
|
post-install:
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
.include <bsd.port.post.mk>
|