diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-07-19 16:31:25 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-07-19 16:31:25 +0000 |
commit | 927f2ff267e05a0ebe6078846feeba98fe89142e (patch) | |
tree | d3aa606aaae752448c7dba24950d78620f80da70 /games/linux-ssamtfe/Makefile | |
parent | 85ad21e871e4cdef0f4e735b6c7f14b9e5bfda5a (diff) | |
download | ports-927f2ff267e05a0ebe6078846feeba98fe89142e.tar.gz ports-927f2ff267e05a0ebe6078846feeba98fe89142e.zip |
Notes
Diffstat (limited to 'games/linux-ssamtfe/Makefile')
-rw-r--r-- | games/linux-ssamtfe/Makefile | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/games/linux-ssamtfe/Makefile b/games/linux-ssamtfe/Makefile new file mode 100644 index 000000000000..9ac4c7e3f381 --- /dev/null +++ b/games/linux-ssamtfe/Makefile @@ -0,0 +1,125 @@ +# New ports collection makefile for: linux-ssamtfe +# Date created: 18 May 2008 +# Whom: Alexander Logvinov <ports@logvinov.com> +# +# $FreeBSD$ +# + +PORTNAME= ssamtfe +PORTVERSION= 1.05b3 +CATEGORIES= games linux +MASTER_SITES= http://liflg.0wnitsch.de/files/final/ +PKGNAMEPREFIX= linux- +DISTFILES= ${PORTNAME:S|ssam|serious.sam.|}_${PORTVERSION:S|b|beta|}-english-2.run + +MAINTAINER= ports@logvinov.com +COMMENT= Serious Sam: The First Encounter + +RUN_DEPENDS= ${LINUXBASE}/usr/lib/libSDL-1.2.so.0:${PORTSDIR}/devel/linux-sdl12 + +OPTIONS= VORBIS "Ogg playing support" on + +USE_LINUX= yes +USE_XLIB= yes +NO_BUILD= yes +NO_PACKAGE= Distribution is 279MB; set FORCE_PACKAGE if you really want\ + to build this package +RESTRICTED= Redistribution is limited, see license +PORTDOCS= README.liflg ShellSymbols.txt changes.txt notes.txt +SUB_FILES= pkg-message + +.include <bsd.port.pre.mk> + +.if defined(WITH_VORBIS) +RUN_DEPENDS+= ${LINUXBASE}/usr/lib/libvorbis.so.0:${PORTSDIR}/audio/linux-libvorbis +PLIST_SUB+= VORBIS="" +.else +PLIST_SUB+= VORBIS="@comment " +.endif + +# Gold Edition +.if exists(${CDROM_MOUNT}/Install/1_00c.gro) +GOLD= yes +GRO_FILES= ExtraTools music +PLIST_SUB+= GOLD="" NORMAL="@comment " +.else +GRO_FILES= ExtraTools a music scripts +PLIST_SUB+= GOLD="@comment " NORMAL="" +.endif + +do-extract: + @${MKDIR} ${WRKSRC}/Data + @cd ${WRKSRC} && ${SED} -e '1,/exit $$res/d' ${_DISTDIR}/${DISTFILES} |\ + ${GUNZIP_CMD} -q | ${TAR} xf - +.for file in SeriousSamPatch105_USA_linux bins + @${TAR} jx -C ${WRKSRC}/Data -f ${WRKSRC}/${file}.tar.bz2 +.endfor + +post-patch: + @${REINPLACE_CMD} -e "s|^\(GAMEDIR=\).*|\1\"${DATADIR}\"|" \ + -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/bin/${PORTNAME} + +do-install: +.if !defined(CDROM_MOUNT) + @${ECHO_CMD} "${PKGNAME} requires CDROM_MOUNT set to mount point of CD" + @${FALSE} +.endif +.if !exists(${CDROM_MOUNT}/Install/Mods/SeriousSamTbn.tex) + @${ECHO_CMD} "${PKGNAME} requires a retail First Encounter disc" + @${FALSE} +.endif + @${MKDIR} ${DATADIR} +.for gro in ${GRO_FILES} + ${INSTALL_DATA} "${CDROM_MOUNT}/Install/1_00_${gro}.gro" ${DATADIR}/1_00_${gro}.gro +.endfor +.if defined(GOLD) +.for gro in "" _scripts + ${INSTALL_DATA} "${CDROM_MOUNT}/Install/1_00c${gro}.gro" ${DATADIR}/1_00c${gro}.gro +.endfor +.endif +.for gro in 1_00_ExtraTools 1_04_patch + ${INSTALL_DATA} ${WRKSRC}/Data/${gro}.gro ${DATADIR}/${gro}.gro +.endfor +.for dir in Controls Data Levels Demos Mods Scripts VirtualTrees + @cd ${CDROM_MOUNT}/Install && \ + ${FIND} ${dir} -type d -exec \ + ${MKDIR} "${DATADIR}/{}" \; && \ + ${FIND} ${dir} -type f -exec \ + ${INSTALL_DATA} "${CDROM_MOUNT}/Install/{}" "${DATADIR}/{}" \; +.endfor +.for dir in Controls Data Help Players SaveGame Scripts Temp + @cd ${WRKSRC}/Data && \ + ${FIND} ${dir} -type d -exec \ + ${MKDIR} "${DATADIR}/{}" \; && \ + ${FIND} ${dir} -type f -exec \ + ${INSTALL_DATA} "${WRKSRC}/Data/{}" "${DATADIR}/{}" \; +.endfor + @${MKDIR} ${DATADIR}/Bin + @cd ${WRKSRC}/Data && \ + ${FIND} Bin -type f -exec \ + ${INSTALL_PROGRAM} "${WRKSRC}/Data/{}" "${DATADIR}/{}" \; + ${BRANDELF} -t Linux ${DATADIR}/Bin/ssam_* + ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${PREFIX}/bin +.if defined(WITH_VORBIS) + ${LN} -fs ${LINUXBASE}/usr/lib/libvorbisfile.so.3 ${DATADIR}/Bin/libvorbisfile.so +.endif + @${FIND} -E ${DATADIR} -type f \ + -iregex ".*\.(ctl|txt|lst|ini|cfg|des|reg)" \ + -exec ${SH} -c "${SED} "s/`printf '\r'`//" '{}' \ + >${WRKDIR}/tmp.txt; ${MV} ${WRKDIR}/tmp.txt '{}'" \; + @${ECHO} SERIOUS_MHZ=2000 > ${PREFIX}/etc/${PORTNAME}.conf.sample +.if !exists(${PREFIX}/etc/${PORTNAME}.conf) + ${INSTALL_DATA} ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf +.endif +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} -p ${WRKSRC}/README.liflg ${DOCSDIR} +.for i in ${PORTDOCS:NREADME.liflg} + ${LN} -sf ${DATADIR}/Help/${i} ${DOCSDIR}/${i} +.endfor +.endif + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> |