blob: 7fd87a84c3d3591a8793390622b74397ee754135 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# New ports collection makefile for: megaglest-data
# Date created: 2010-11-12
# Whom: Sven Moeller <smoeller@nichthelfer.de>
#
# $FreeBSD$
#
PORTNAME= megaglest
PORTVERSION= 3.5.2
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/current_release/
PKGNAMESUFFIX= -data
DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}.3
MAINTAINER= smoeller@nichthelfer.de
COMMENT= MegaGlest data files
USE_XZ= yes
USE_DOS2UNIX= *.log *.ini *.html *.txt *.lng
NO_BUILD= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PLIST= ${WRKDIR}/pkg-plist
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/applications" >> ${PLIST}
@${ECHO_CMD} "@dirrmtry share/icons" >> ${PLIST}
@${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST}
.if !defined(NOPORTDOCS)
@cd ${WRKSRC}/docs && \
${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%PORTDOCS%%%%DOCSDIR%%/|' >> ${PLIST} && \
${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|%%PORTDOCS%%@dirrm %%DOCSDIR%%/|' >> ${PLIST}
@${ECHO_CMD} "%%PORTDOCS%%@dirrm %%DOCSDIR%%" >> ${PLIST}
.endif
do-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}/glest_factions
.for f in AUTHORS.data.txt README.data-license.txt cc-by-sa-3.0-unported.txt COPYRIGHT.data.txt
${INSTALL_DATA} ${WRKSRC}/docs/${f} ${DOCSDIR}
.endfor
(cd ${WRKSRC}/docs/glest_factions && ${COPYTREE_SHARE} "*" ${DOCSDIR}/glest_factions)
.endif
@${MKDIR} ${DATADIR}
${MKDIR} ${PREFIX}/share/applications
${INSTALL_DATA} ${WRKSRC}/megaglest.desktop ${PREFIX}/share/applications/
${MKDIR} ${PREFIX}/share/icons
${INSTALL_DATA} ${WRKSRC}/megaglest.png ${PREFIX}/share/icons/
.for DIR in data maps scenarios techs tilesets tutorials
${MKDIR} ${DATADIR}/${DIR}
(cd ${WRKSRC}/${DIR} && ${COPYTREE_SHARE} "*" ${DATADIR}/${DIR})
.endfor
.include <bsd.port.mk>
|