freebsd-ports/games/megaglest-data/Makefile
Adam Weinberger fff296bfe7 Convert a bunch of USE_XZ to USES=tar:xz.
Approved by:	portmgr (not really, but touches unstaged ports)
2014-07-29 21:07:39 +00:00

52 lines
1.9 KiB
Makefile

# Created by: Sven Moeller <smoeller@nichthelfer.de>
# $FreeBSD$
PORTNAME= megaglest
PORTVERSION= 3.9.0
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}_${PORTVERSION}/
PKGNAMESUFFIX= -data
DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}
MAINTAINER= rnejdl@ringofsaturn.com
COMMENT= MegaGlest data files
USES= dos2unix tar:xz
DOS2UNIX_GLOB= *.log *.ini *.html *.txt *.lng
NO_BUILD= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PLIST= ${WRKDIR}/pkg-plist
BASEDOCS= AUTHORS.data.txt README.data-license.txt \
cc-by-sa-3.0-unported.txt COPYRIGHT.data.txt
PORTDOCS= *
pre-install:
${RM} -f ${PLIST}
.for DIR in data maps scenarios techs tilesets tutorials
@cd ${WRKSRC} && \
${FIND} ${DIR} -type d -empty | ${SORT} -r | ${SED} -e 's|^|@exec ${MKDIR} %D/%%DATADIR%%/|' -e 's|$$| > /dev/null 2>\&1|' >> ${PLIST} && \
${FIND} ${DIR} -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
${FIND} ${DIR} -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}
.endfor
@${ECHO_CMD} "share/applications/megaglest.desktop" >> ${PLIST}
@${ECHO_CMD} "share/icons/megaglest.png" >> ${PLIST}
@${ECHO_CMD} "@dirrmtry share/icons" >> ${PLIST}
@${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST}
do-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}/glest_factions
${INSTALL_DATA} ${BASEDOCS:S,^,${WRKSRC}/docs/,} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/docs/glest_factions && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/glest_factions)
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/megaglest.desktop ${STAGEDIR}${PREFIX}/share/applications/
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons
${INSTALL_DATA} ${WRKSRC}/megaglest.png ${STAGEDIR}${PREFIX}/share/icons/
.for DIR in data maps scenarios techs tilesets tutorials
${MKDIR} ${STAGEDIR}${DATADIR}/${DIR}
(cd ${WRKSRC}/${DIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/${DIR})
.endfor
.include <bsd.port.mk>