aboutsummaryrefslogtreecommitdiffstats
path: root/games/dangerdeep-data/Makefile
blob: b2751ae16dcdfa22331782f0aab785d8988101a9 (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
# New ports collection makefile for:    dangerdeep-data
# Date created:     2006-10-12
# Whom:         Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   data
PORTVERSION=    0.3.0
CATEGORIES= games
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= dangerdeep
PKGNAMEPREFIX=  dangerdeep-
DISTNAME=   ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}
DIST_SUBDIR=    ${PKGNAMEPREFIX:S/-//}

MAINTAINER= acm@FreeBSD.org
COMMENT=    The Danger from the Deep data files

USE_ZIP=    yes
NO_BUILD=   yes

DATADIR=    share/${PKGNAMEPREFIX:S/-//}
PLIST=      ${WRKDIR}/pkg-plist
WRKSRC=     ${WRKDIR}/${PORTNAME}

pre-install:
    @${RM} -f ${PLIST}
    @cd ${WRKSRC} && \
        ${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
            ${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}
    @${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST}

do-install:
    @${MKDIR} ${PREFIX}/${DATADIR}
    cd ${WRKSRC} && \
        ${FIND} * -type d -exec ${MKDIR} "${PREFIX}/${DATADIR}/{}" \; && \
            ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${PREFIX}/${DATADIR}/{}" \;

.include <bsd.port.mk>