summaryrefslogtreecommitdiff
path: root/games/galaxyhack/Makefile
blob: af9666b0fe5af5d2797dc7cbe0850a9188a0a376 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# New ports collection makefile for:	galaxyhack
# Date created:				10 Aug 2005
# Whom:					Alejandro Pulver <alejandro@varnet.biz>
#
# $FreeBSD$
#

PORTNAME=	galaxyhack
PORTVERSION=	1.74
PORTREVISION=	6
CATEGORIES=	games
MASTER_SITES=	SF
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

MAINTAINER=	alepulver@FreeBSD.org
COMMENT=	AI script based strategy game

LIB_DEPENDS=	boost_filesystem.4:${PORTSDIR}/devel/boost-libs \
		freetype.9:${PORTSDIR}/print/freetype2

USE_BZIP2=	yes
USE_DOS2UNIX=	yes
USE_GMAKE=	yes
USE_SDL=	gfx image mixer sdl
WRKSRC=		${WRKDIR}/${PORTNAME}/src

OPTIONS=	FLEETS "Install additional fleets" off \
		OPTIMIZED_CFLAGS "Enable compilation optimizations" on

ALL_TARGET=	${PORTNAME}
SUB_FILES=	${PORTNAME}-sh
FLEETS_FILE=	gh_fleets_020906.zip

.include <bsd.port.pre.mk>

.if defined(WITH_FLEETS)
EXTRACT_DEPENDS+=	unzip:${PORTSDIR}/archivers/unzip
DISTFILES+=	${FLEETS_FILE}
PLIST_SUB+=	FLEETS=""
.else
PLIST_SUB+=	FLEETS="@comment "
.endif

.if !defined(WITHOUT_OPTIMIZED_CFLAGS)
MAKE_ENV+=	OPTIMIZED_CFLAGS=YES
.endif

do-install:
	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-sh ${PREFIX}/bin/${PORTNAME}
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/libexec
	${MKDIR} ${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/../settings.dat ${DATADIR}
.for d in fleets gamedata graphics music standardpictures
	${CP} -R ${WRKSRC}/../${d} ${DATADIR}
.endfor
.if defined(WITH_FLEETS)
	@${UNZIP_CMD} -o ${DISTDIR}/${FLEETS_FILE} -x "*/CVS/*" "*/.svn/*" \
		-d ${DATADIR}
.endif

post-install:
	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}
	@${FIND} ${DATADIR} -type f -print0 | \
		${XARGS} -0 ${CHMOD} ${SHAREMODE}
	@${FIND} ${DATADIR} -type d -print0 | \
		${XARGS} -0 ${CHMOD} ${BINMODE}

.include <bsd.port.post.mk>