summaryrefslogtreecommitdiff
path: root/games/alienblaster/Makefile
blob: 13a087c7b9e6123471e3911a7c33cd6c961640d3 (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
# Created by: Alejandro Pulver <alejandro@varnet.biz>

PORTNAME=	alienblaster
PORTVERSION=	1.1.0
PORTREVISION=	7
CATEGORIES=	games
MASTER_SITES=	http://www.schwardtnet.de/alienblaster/archives/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Alien Blaster

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		gmake sdl tar:tgz
USE_SDL=	mixer sdl
REINPLACE_ARGS=	-i ''

WRKSRC=		${WRKDIR}/${PORTNAME}

post-patch:
# Fix make command
	@${REINPLACE_CMD} -e 's|make|${MAKE_CMD}|g' ${WRKSRC}/${MAKEFILE}

# Fix Makefile
	@${REINPLACE_CMD} -e 's|alienBlaster|${PORTNAME}|g ; \
			s|g++|${CXX}|g ; \
			s|-g||g ; \
			s|sdl-config|${SDL_CONFIG}|g ; \
			s|@echo ""||g' \
				${WRKSRC}/src/Makefile

# Fix paths to ${DATADIR}
	@${REINPLACE_CMD} -e 's|\./|${DATADIR}/|g' \
				${WRKSRC}/src/global.h \
				${WRKSRC}/src/global.cc
	@${REINPLACE_CMD} -e 's|\./|${DATADIR}/|g ; \
			s|=\(images\)|=${DATADIR}/\1|g' \
				${WRKSRC}/cfg/level*.cfg

do-install:
# Executable
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin

# Data
	@${MKDIR} ${STAGEDIR}${DATADIR}
.for d in cfg images sound
	${CP} -R ${WRKSRC}/${d} ${STAGEDIR}${DATADIR}
.endfor

.include <bsd.port.mk>