aboutsummaryrefslogtreecommitdiffstats
path: root/games/bos/Makefile
blob: 96d4bc82830f04958a31e74bb1e1395f520cbd5d (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
# New ports collection makefile for:    bos
# Date created:             14 Oct 2005
# Whom:                 Alejandro Pulver <alejandro@varnet.biz>
#
# $FreeBSD$
#

PORTNAME=   bos
PORTVERSION=    1.1
CATEGORIES= games
MASTER_SITES=   http://bos.seul.org/files/
DISTNAME=   ${PORTNAME}_${PORTVERSION:S/./_/g}

MAINTAINER= alepulver@FreeBSD.org
COMMENT=    A real-time strategy game

RUN_DEPENDS=    stratagus:${PORTSDIR}/games/stratagus

PLIST=      ${WRKDIR}/pkg-plist

PLIST_FILES=    bin/bos
PLIST_DIRS= %%DATADIR%%

do-build:
    @(${ECHO_CMD} "#!${SH}"; \
      ${ECHO_CMD} 'exec ${LOCALBASE}/bin/stratagus -d ${DATADIR} "$$@"') \
      > ${WRKDIR}/${PORTNAME}

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

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

.include <bsd.port.mk>