aboutsummaryrefslogtreecommitdiffstats
path: root/games/searchandrescue/Makefile
blob: 98d17abc2f64a0d92466c502f6789529d0bba9be (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
# New ports collection makefile for:    SearchAndRescue
# Date created:         10 June 2010
# Whom:             Jesse Smith <jessefrgsmith@yahoo.ca>
#
# $FreeBSD$
#

PORTNAME=   SearchAndRescue
PORTVERSION=    1.0.0
CATEGORIES= games
MASTER_SITES=   SF/${PORTNAME:L}/Program/

MAINTAINER= jessefrgsmith@yahoo.ca
COMMENT=    A flight simulator in which the player rescues people

RUN_DEPENDS=    ${LOCALBASE}/share/searchandrescue/human.ini:${PORTSDIR}/games/searchandrescue-data

USE_SDL=    mixer
USE_XORG=   x11 xau xdmcp xext xmu xpm xxf86vm
USE_GL=     glu
WRKSRC=     ${WRKDIR}/${PORTNAME:L}_${PORTVERSION}

PLIST_FILES=    bin/${PORTNAME} \
        ${DESKTOPDIR:S,${PREFIX}/,,}/${PORTNAME}.desktop \
        share/pixmaps/${PORTNAME}.xpm
PLIST_DIRS= ${DESKTOPDIR:S,${PREFIX}/,,}

#Respect PREFIX, LOCALBASE, CC, etc.
post-patch:
    ${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
        -e 's,%%PREFIX%%,${PREFIX},g' \
        ${WRKSRC}/sar/config.h
    ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
        -e 's,/usr/local,${LOCALBASE},g' \
        -e 's,/usr/X11R6,${LOCALBASE},g' \
        -e '/^CFLAGS = /s,=,= ${CFLAGS},g' \
        -e '/^CC = /s, = .*, = ${CC},' \
        -e '/^CPP = /s, = .*, = ${CXX},' \
        ${WRKSRC}/sar/Makefile

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/sar/${PORTNAME} ${PREFIX}/bin
    ${MKDIR} ${DESKTOPDIR}
    ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${DESKTOPDIR}
    ${INSTALL_DATA} ${WRKSRC}/sar/icons/${PORTNAME}.xpm ${PREFIX}/share/pixmaps

.include <bsd.port.mk>