summaryrefslogtreecommitdiff
path: root/games/xbat/Makefile
blob: d3472ee3d6de4918606174fd13cc26ca1d5e8c28 (plain)
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
# $NetBSD: Makefile,v 1.19 2019/11/04 17:47:30 rillig Exp $

DISTNAME=	xev111
PKGNAME=	xbat-1.11
PKGREVISION=	2
CATEGORIES=	games
MASTER_SITES=	http://www.nemoto.ecei.tohoku.ac.jp/~wai/Xbat/
MASTER_SITES+=	${MASTER_SITE_FREEBSD}

MAINTAINER=	pkgsrc-users@NetBSD.org
#HOMEPAGE=	http://www.nemoto.ecei.tohoku.ac.jp/~wai/index_e.html
COMMENT=	XEVIOUS like shooting game

RESTRICTED=		Possible copyright infringement
NO_SRC_ON_CDROM=	${RESTRICTED}
NO_BIN_ON_CDROM=	${RESTRICTED}
NO_SRC_ON_FTP=		${RESTRICTED}
NO_BIN_ON_FTP=		${RESTRICTED}

WRKSRC=		${WRKDIR}/Xev111
USE_IMAKE=	yes
BUILD_TARGET=	xbat

MAKE_FLAGS+=	INSTLINFLAGS="-o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE}"
MAKE_FLAGS+=	INSTPGMFLAGS="-o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEMODE}"
MAKE_FLAGS+=	VARBASE=${VARBASE}

SCORE_DIR=	share/games/Xbat/Score

SETGIDGAME=		yes
SPECIAL_PERMS=		bin/xbat ${SETGID_GAMES_PERMS}
REQD_DIRS_PERMS+=	${VARBASE}/games/Xbat ${GAMES_USER} ${GAMES_GROUP} ${GAMEDIRMODE}
.for n in 0 1 2 3 4
REQD_FILES_PERMS+=	${SCORE_DIR}/top10-${n}.txt			\
			${VARBASE}/games/Xbat/top10-${n}.txt 		\
			${GAMES_USER} ${GAMES_GROUP} ${GAMEDATAMODE}
.endfor

BUILD_DEFS+=	VARBASE
BUILD_DEFS+=	GAMEDATAMODE
BUILD_DEFS+=	GAMEMODE

.include "../../mk/endian.mk"

.if ${MACHINE_ENDIAN} == "big"
MAKE_FLAGS+=	UNION=0
.elif ${MACHINE_ENDIAN} == "little"
MAKE_FLAGS+=	UNION=1
.else
BROKEN=		"Unknown endianness"
.endif

post-install:
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${SCORE_DIR}
.for n in 0 1 2 3 4
	${INSTALL_DATA} ${WRKSRC}/Score/top10-${n}.txt	\
		${DESTDIR}${PREFIX}/${SCORE_DIR}/top10-${n}.txt
.endfor

.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"