freebsd-ports/games/quake2-extras/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

95 lines
2.5 KiB
Makefile

PORTNAME= extras
PORTVERSION= 1.0
CATEGORIES= games
MASTER_SITES= http://offload1.icculus.org/quake2/files/:retex \
http://www.icculus.org/quake2/files/:retex \
http://www-personal.umich.edu/~jimw/q2/files/:retex2 \
http://www-personal.umich.edu/~jimw/q2/aq2_install/:models
PKGNAMEPREFIX= ${Q2PKGNAMEPREFIX}
DISTFILES= #
DIST_SUBDIR= ${PKGBASE}
EXTRACT_ONLY= #
MAINTAINER= danfe@FreeBSD.org
COMMENT= Quake II extras (high quality textures and skins)
WWW= http://www-personal.umich.edu/~jimw/q2/index.htm
USES= zip
NO_WRKSUBDIR= yes
RETEX_PAKS= 10 11 12 13 14 16 17 19
RETEX_FULL= all_q2_textures_07_17_2006zip
SKINS= models.zip
OPTIONS_DEFINE= RETEXTURE RETEXTURE_FULL SKINS
OPTIONS_DEFAULT= RETEXTURE
RETEXTURE_DESC= Install high quality textures
RETEXTURE_FULL_DESC= Install more textures (120MB)
SKINS_DESC= Install high quality skins
.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MRETEXTURE_FULL} || ${PORT_OPTIONS:MSKINS}
BUILD_DEPENDS+= nwreckdum:archivers/nwreckdum
PLIST_FILES+= %%Q2DIR%%/baseq2/pak20.pak
.endif
.if ${PORT_OPTIONS:MRETEXTURE} && ! ${PORT_OPTIONS:MRETEXTURE_FULL}
.for i in ${RETEX_PAKS}
DISTFILES+= pak${i}.pak:retex
PLIST_FILES+= %%Q2DIR%%/baseq2/pak${i}.pak
.endfor
PLIST_SUB+= RETEX=""
.else
PLIST_SUB+= RETEX="@comment "
.endif
.if ${PORT_OPTIONS:MRETEXTURE_FULL}
DISTFILES+= ${RETEX_FULL}:retex2
EXTRACT_ONLY+= ${RETEX_FULL}
PLIST_FILES+= %%Q2DIR%%/baseq2/pak10.pak
.endif
.if ${PORT_OPTIONS:MSKINS}
DISTFILES+= ${SKINS}:models
EXTRACT_ONLY+= ${SKINS}
PLIST_FILES+= %%Q2DIR%%/baseq2/pak20.pak
.endif
post-extract:
.if ${PORT_OPTIONS:MRETEXTURE_FULL}
@${MKDIR} ${WRKSRC}/pak10
@${MV} ${WRKSRC}/textures ${WRKSRC}/pak10
.endif
.if ${PORT_OPTIONS:MSKINS}
@${MKDIR} ${WRKSRC}/pak20
@${MV} ${WRKSRC}/models ${WRKSRC}/pak20
.endif
do-build:
.if ${PORT_OPTIONS:MRETEXTURE_FULL}
@nwreckdum -c -p ${WRKSRC}/pak10.pak -d ${WRKSRC}/pak10
.endif
.if ${PORT_OPTIONS:MSKINS}
@nwreckdum -c -p ${WRKSRC}/pak20.pak -d ${WRKSRC}/pak20
.endif
do-install:
@${MKDIR} ${STAGEDIR}${Q2DIR}/baseq2
.if ${PORT_OPTIONS:MRETEXTURE} && empty(PORT_OPTIONS:MRETEXTURE_FULL)
. for i in ${RETEX_PAKS}
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/pak${i}.pak \
${STAGEDIR}${Q2DIR}/baseq2
. endfor
.endif
.if ${PORT_OPTIONS:MRETEXTURE_FULL}
${INSTALL_DATA} ${WRKSRC}/pak10.pak ${STAGEDIR}${Q2DIR}/baseq2
.endif
.if ${PORT_OPTIONS:MSKINS}
${INSTALL_DATA} ${WRKSRC}/pak20.pak ${STAGEDIR}${Q2DIR}/baseq2
.endif
.include <bsd.port.mk>