aboutsummaryrefslogtreecommitdiffstats
path: root/games/moonlander/Makefile
blob: 460e4eec43dd1ae35346205baed036ddf0cfe081 (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
# Created by: Kris Kennaway <kris@FreeBSD.org>
# $FreeBSD$

PORTNAME=   moonlander
PORTVERSION=    1.0
PORTREVISION=   12
CATEGORIES= games
MASTER_SITES=   ${MASTER_SITE_DEBIAN}
MASTER_SITE_SUBDIR=pool/main/m/moon-lander
DISTNAME=   moon-lander_1.0.orig

MAINTAINER= amdmi3@FreeBSD.org
COMMENT=    Land a spacecraft on the moon

LICENSE=    BSD
LICENSE_FILE=   ${WRKSRC}/README.txt

USE_SDL=    mixer image sdl
MAKE_JOBS_SAFE= yes

WRKSRC=     ${WRKDIR}/moon-lander

OPTIONS=    SOUND
OPTIONS_DEFINE= SOUND

.include <bsd.port.options.mk>

install_dirs=   fonts images
.if ${PORT_OPTIONS:MSOUND}
PLIST_SUB+= SOUND=
install_dirs+=  sounds
.else
CFLAGS+=    -DNOSOUND
PLIST_SUB+= SOUND="@comment "
.endif

do-configure:
    ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/moon_lander.c

do-install:
    @${MKDIR} ${PREFIX}/bin; \
    ${INSTALL_PROGRAM} ${WRKSRC}/moonlander ${PREFIX}/bin; \
    ${MKDIR} ${DATADIR}
.for i in ${install_dirs}
    @${CP} -R ${WRKSRC}/${i} ${DATADIR}
.endfor

post-install:
    @${FIND} ${PREFIX}/share/moonlander -type f -print0 | \
        ${XARGS} -0 ${CHMOD} 444

.include <bsd.port.mk>