Merge from vendor branch TNF:
[pkgsrcv2.git] / games / mirrormagic / Makefile
1 # $NetBSD: Makefile,v 1.29 2008/05/26 02:13:19 joerg Exp $
2 #
3
4 DISTNAME=               mirrormagic-2.0.2
5 PKGREVISION=            2
6 CATEGORIES=             games x11
7 MASTER_SITES=           http://www.artsoft.org/RELEASES/unix/mirrormagic/
8
9 MAINTAINER=             pkgsrc-users@NetBSD.org
10 HOMEPAGE=               http://www.artsoft.org/mirrormagic/
11 COMMENT=                Nice little puzzle game with color graphics and sound
12
13 CONFLICTS=              mirrormagic-sdl-[1-9]*
14
15 PKG_DESTDIR_SUPPORT=    user-destdir
16
17 USE_TOOLS+=             gmake pax
18 PLIST_SRC=              ${WRKDIR}/PLIST PLIST
19
20 # if you change SCORE_PATH, don't forget to change patch-aa, too
21 SCORE_PATH=             /var/games/mirrormagic
22
23 SETGIDGAME=             yes
24 OWN_DIRS_PERMS=         ${SCORE_PATH} ${GAMES_USER} ${GAMES_GROUP} ${GAMEDIRMODE}
25 OWN_DIRS_PERMS+=        ${SCORE_PATH}/scores                            \
26                                 ${GAMES_USER} ${GAMES_GROUP} ${GAMEDIRMODE}
27 OWN_DIRS_PERMS+=        ${SCORE_PATH}/scores/classic_deflektor          \
28                                 ${GAMES_USER} ${GAMES_GROUP} ${GAMEDIRMODE}
29 OWN_DIRS_PERMS+=        ${SCORE_PATH}/scores/classic_mindbender         \
30                                 ${GAMES_USER} ${GAMES_GROUP} ${GAMEDIRMODE}
31
32 SPECIAL_PERMS=          bin/mirrormagic ${SETGID_GAMES_PERMS}
33
34 INSTALLATION_DIRS=      bin share/mirrormagic
35
36 do-install:
37         ${INSTALL_PROGRAM} ${WRKSRC}/mirrormagic ${DESTDIR}${PREFIX}/bin
38         cd ${WRKSRC} && pax -rw graphics levels music sounds \
39                 ${DESTDIR}${PREFIX}/share/mirrormagic/
40
41         ${RM} -f ${WRKDIR}/PLIST
42 .for levdir in Classic_Games
43         cd ${DESTDIR}${PREFIX} && \
44         ${FIND} share/mirrormagic/levels/${levdir} -type f -print \
45                 >>${WRKDIR}/PLIST
46 .endfor
47 .for directory in graphics music sounds
48         cd ${DESTDIR}${PREFIX} && \
49         ${FIND} share/mirrormagic/${directory} -type f -print \
50                 >>${WRKDIR}/PLIST
51 .endfor
52
53 BUILDLINK_DEPMETHOD.libXt?=     build
54
55 .include "../../x11/libX11/buildlink3.mk"
56 .include "../../x11/libXt/buildlink3.mk"
57 .include "../../mk/bsd.pkg.mk"