DESTDIR suport. SETGIDGAME. Bump revision.diff -r1.11 -r1.12 pkgsrc/games/moria/Makefile
(joerg)
@@ -1,31 +1,33 @@ | @@ -1,31 +1,33 @@ | |||
1 | # $NetBSD: Makefile,v 1.11 2007/03/24 19:21:24 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.12 2010/06/25 22:12:31 joerg Exp $ | |
2 | 2 | |||
3 | DISTNAME= um5.5.2 | 3 | DISTNAME= um5.5.2 | |
4 | PKGNAME= moria-5.5.2 | 4 | PKGNAME= moria-5.5.2 | |
5 | PKGREVISION= 1 | |||
5 | CATEGORIES= games | 6 | CATEGORIES= games | |
6 | # The "offical" master site has lost the pub/Games directory. | 7 | # The "offical" master site has lost the pub/Games directory. | |
7 | #MASTER_SITES= ftp://ftp.cis.ksu.edu/pub/Games/Moria/source/ | 8 | #MASTER_SITES= ftp://ftp.cis.ksu.edu/pub/Games/Moria/source/ | |
8 | MASTER_SITES= ftp://ftp.funet.fi/pub/unix/games/moria/source/ | 9 | MASTER_SITES= ftp://ftp.funet.fi/pub/unix/games/moria/source/ | |
9 | EXTRACT_SUFX= .tar.Z | 10 | EXTRACT_SUFX= .tar.Z | |
10 | 11 | |||
11 | MAINTAINER= simonb@NetBSD.org | 12 | MAINTAINER= simonb@NetBSD.org | |
12 | HOMEPAGE= http://www-math.bgsu.edu/~grabine/moria.html | 13 | HOMEPAGE= http://www-math.bgsu.edu/~grabine/moria.html | |
13 | COMMENT= Rogue-like game with a different sense of scale than Rogue | 14 | COMMENT= Rogue-like game with a different sense of scale than Rogue | |
14 | 15 | |||
16 | PKG_DESTDIR_SUPPORT= user-destdir | |||
17 | ||||
15 | WRKSRC= ${WRKDIR}/umoria | 18 | WRKSRC= ${WRKDIR}/umoria | |
16 | MAKE_FLAGS+= CURSES=-lncurses | 19 | MAKE_FLAGS+= CURSES=-lncurses | |
17 | 20 | |||
18 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man6 | 21 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man6 | |
19 | 22 | |||
23 | SETGIDGAME= yes | |||
24 | CONF_FILES_PERMS+= /dev/null /var/games/moria.scores \ | |||
25 | ${GAMES_USER} ${GAMES_GROUP} ${GAMEDATAMODE} | |||
26 | SPECIAL_PERMS= bin/moria ${SETGID_GAMES_PERMS} | |||
27 | ||||
20 | do-configure: | 28 | do-configure: | |
21 | @${RM} -f ${WRKSRC}/*.[ch] ${WRKSRC}/Makefile | 29 | @${RM} -f ${WRKSRC}/*.[ch] ${WRKSRC}/Makefile | |
22 | @cd ${WRKSRC}; ${LN} -s source/* unix/* . | 30 | @cd ${WRKSRC}; ${LN} -s source/* unix/* . | |
23 | 31 | |||
24 | post-install: | |||
25 | @if [ ! -f /var/games/moria.scores ]; then \ | |||
26 | ${CP} -p ${PREFIX}/share/games/moria/scores.dist \ | |||
27 | /var/games/moria.scores ; \ | |||
28 | fi | |||
29 | ||||
30 | .include "../../devel/ncurses/buildlink3.mk" | 32 | .include "../../devel/ncurses/buildlink3.mk" | |
31 | .include "../../mk/bsd.pkg.mk" | 33 | .include "../../mk/bsd.pkg.mk" |
@@ -1,24 +1,22 @@ | @@ -1,24 +1,22 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.3 2009/06/14 17:56:51 joerg Exp $ | 1 | @comment $NetBSD: PLIST,v 1.4 2010/06/25 22:12:31 joerg Exp $ | |
2 | bin/moria | 2 | bin/moria | |
3 | man/man6/moria.6 | 3 | man/man6/moria.6 | |
4 | share/doc/moria/ERRORS | 4 | share/doc/moria/ERRORS | |
5 | share/doc/moria/FEATURES.NEW | 5 | share/doc/moria/FEATURES.NEW | |
6 | share/doc/moria/dragon.inf | 6 | share/doc/moria/dragon.inf | |
7 | share/doc/moria/exp.doc | 7 | share/doc/moria/exp.doc | |
8 | share/doc/moria/faq | 8 | share/doc/moria/faq | |
9 | share/doc/moria/history | 9 | share/doc/moria/history | |
10 | share/doc/moria/moria.ms | 10 | share/doc/moria/moria.ms | |
11 | share/doc/moria/moria.txt | 11 | share/doc/moria/moria.txt | |
12 | share/doc/moria/pronounc | 12 | share/doc/moria/pronounc | |
13 | share/doc/moria/spells.doc | 13 | share/doc/moria/spells.doc | |
14 | share/doc/moria/where.inf | 14 | share/doc/moria/where.inf | |
15 | share/games/moria/hours | 15 | share/games/moria/hours | |
16 | share/games/moria/news | 16 | share/games/moria/news | |
17 | share/games/moria/origcmds.hlp | 17 | share/games/moria/origcmds.hlp | |
18 | share/games/moria/owizcmds.hlp | 18 | share/games/moria/owizcmds.hlp | |
19 | share/games/moria/roglcmds.hlp | 19 | share/games/moria/roglcmds.hlp | |
20 | share/games/moria/rwizcmds.hlp | 20 | share/games/moria/rwizcmds.hlp | |
21 | share/games/moria/scores.dist | |||
22 | share/games/moria/version.hlp | 21 | share/games/moria/version.hlp | |
23 | share/games/moria/welcome.hlp | 22 | share/games/moria/welcome.hlp | |
24 | @exec if [ ! -f /var/games/moria.scores ]; then cp -p %D/share/games/moria/scores.dist /var/games/moria.scores; fi |
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | $NetBSD: distinfo,v 1.9 2007/03/06 23:25:47 rillig Exp $ | 1 | $NetBSD: distinfo,v 1.10 2010/06/25 22:12:31 joerg Exp $ | |
2 | 2 | |||
3 | SHA1 (um5.5.2.tar.Z) = 69c7a7bf4e2c5be123ee7a82f5ad12ad5d0f5b08 | 3 | SHA1 (um5.5.2.tar.Z) = 69c7a7bf4e2c5be123ee7a82f5ad12ad5d0f5b08 | |
4 | RMD160 (um5.5.2.tar.Z) = 1556c76f151d7ea29da79071a57398f63d0b138b | 4 | RMD160 (um5.5.2.tar.Z) = 1556c76f151d7ea29da79071a57398f63d0b138b | |
5 | Size (um5.5.2.tar.Z) = 910536 bytes | 5 | Size (um5.5.2.tar.Z) = 910536 bytes | |
6 | SHA1 (patch-aa) = 90dd341c52e322ce7a9cacc706e9f0db49c9253b | 6 | SHA1 (patch-aa) = e2e07df29ffd72809ee36542f62ef1edf501c3cc | |
7 | SHA1 (patch-ab) = 21418a69d7a694894dd9408513693f87fff91953 | 7 | SHA1 (patch-ab) = 21418a69d7a694894dd9408513693f87fff91953 | |
8 | SHA1 (patch-ac) = ea9e23de0a147f317a579a4a04502cb165b4c4bd | 8 | SHA1 (patch-ac) = ea9e23de0a147f317a579a4a04502cb165b4c4bd | |
9 | SHA1 (patch-ad) = f83f4596677b8d37493145f82a4d2d5cb489b53a | 9 | SHA1 (patch-ad) = f83f4596677b8d37493145f82a4d2d5cb489b53a | |
10 | SHA1 (patch-ae) = 5cf8ad7c6e5d87856a31a5456ba9ed2422075988 | 10 | SHA1 (patch-ae) = 5cf8ad7c6e5d87856a31a5456ba9ed2422075988 | |
11 | SHA1 (patch-af) = f8a9f32dffa2123512e36c774ca75e0b28a053cc | 11 | SHA1 (patch-af) = f8a9f32dffa2123512e36c774ca75e0b28a053cc | |
12 | SHA1 (patch-ag) = af425b9a48c17f170fc780909b7287264a053cc4 | 12 | SHA1 (patch-ag) = af425b9a48c17f170fc780909b7287264a053cc4 | |
13 | SHA1 (patch-ah) = e5eb295222a007a83600d9ed17ef0a0e0fd24875 | 13 | SHA1 (patch-ah) = e5eb295222a007a83600d9ed17ef0a0e0fd24875 | |
14 | SHA1 (patch-ai) = ab8de35dad1870edb8549966aca60d0f5bdf2187 | 14 | SHA1 (patch-ai) = ab8de35dad1870edb8549966aca60d0f5bdf2187 | |
15 | SHA1 (patch-aj) = f0ac2b33ce021f3c2757bb37e9a5749842901556 | 15 | SHA1 (patch-aj) = f0ac2b33ce021f3c2757bb37e9a5749842901556 | |
16 | SHA1 (patch-ak) = 3b39f9bd883cae5cd0a8a2561fcb1bcdbfa0bc1b | 16 | SHA1 (patch-ak) = 3b39f9bd883cae5cd0a8a2561fcb1bcdbfa0bc1b | |
17 | SHA1 (patch-al) = da8992fc3b7a57fdf78d5656a8a8f01b8628c8fd | 17 | SHA1 (patch-al) = 0625fd70eeecaa7e0b5f5874b180244fb1f034c2 | |
18 | SHA1 (patch-am) = b5d250e9b870e3540c382c7e7c588e1f1c5a4910 | 18 | SHA1 (patch-am) = b5d250e9b870e3540c382c7e7c588e1f1c5a4910 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: patch-aa,v 1.2 2002/08/21 06:25:11 simonb Exp $ | 1 | $NetBSD: patch-aa,v 1.3 2010/06/25 22:12:31 joerg Exp $ | |
2 | 2 | |||
3 | --- unix/Makefile.orig Fri Jul 22 08:37:08 1994 | 3 | --- unix/Makefile.orig Fri Jul 22 08:37:08 1994 | |
4 | +++ unix/Makefile | 4 | +++ unix/Makefile | |
5 | @@ -3,15 +3,18 @@ | 5 | @@ -3,15 +3,18 @@ | |
6 | # LIBDIR must be the same directory defined in config.h | 6 | # LIBDIR must be the same directory defined in config.h | |
7 | # OWNER is who you want the game to be chown to. | 7 | # OWNER is who you want the game to be chown to. | |
8 | # GROUP is who you wnat the game to be chgrp to. | 8 | # GROUP is who you wnat the game to be chgrp to. | |
9 | -BINDIR = /home/zariski/grabiner/moria | 9 | -BINDIR = /home/zariski/grabiner/moria | |
10 | -LIBDIR = /home/zariski/grabiner/moria/files | 10 | -LIBDIR = /home/zariski/grabiner/moria/files | |
11 | -OWNER = grabiner | 11 | -OWNER = grabiner | |
12 | -GROUP = grad | 12 | -GROUP = grad | |
13 | +BINDIR = ${PREFIX}/bin | 13 | +BINDIR = ${PREFIX}/bin | |
14 | +LIBDIR = ${PREFIX}/share/games/moria | 14 | +LIBDIR = ${PREFIX}/share/games/moria | |
@@ -25,50 +25,45 @@ $NetBSD: patch-aa,v 1.2 2002/08/21 06:25 | @@ -25,50 +25,45 @@ $NetBSD: patch-aa,v 1.2 2002/08/21 06:25 | |||
25 | +CPPFLAGS+=-Dunix -DLIBDIR=\"${LIBDIR}\" -DMORIA_TOP=\"${SCOREFILE}\" | 25 | +CPPFLAGS+=-Dunix -DLIBDIR=\"${LIBDIR}\" -DMORIA_TOP=\"${SCOREFILE}\" | |
26 | 26 | |||
27 | # For BSD Systems | 27 | # For BSD Systems | |
28 | CURSES = -lcurses -ltermcap | 28 | CURSES = -lcurses -ltermcap | |
29 | @@ -45,6 +48,8 @@ | 29 | @@ -45,6 +48,8 @@ | |
30 | LIBFILES = hours news origcmds.hlp owizcmds.hlp roglcmds.hlp rwizcmds.hlp \ | 30 | LIBFILES = hours news origcmds.hlp owizcmds.hlp roglcmds.hlp rwizcmds.hlp \ | |
31 | version.hlp welcome.hlp | 31 | version.hlp welcome.hlp | |
32 | 32 | |||
33 | +all: moria | 33 | +all: moria | |
34 | + | 34 | + | |
35 | moria : $(OBJS) | 35 | moria : $(OBJS) | |
36 | $(CC) -o moria $(CFLAGS) $(OBJS) $(CURSES) $(LFLAGS) | 36 | $(CC) -o moria $(CFLAGS) $(OBJS) $(CURSES) $(LFLAGS) | |
37 | 37 | |||
38 | @@ -57,22 +62,21 @@ | 38 | @@ -57,22 +62,16 @@ | |
39 | TAGS : $(SRCS) | 39 | TAGS : $(SRCS) | |
40 | ctags -x $(SRCS) > TAGS | 40 | ctags -x $(SRCS) > TAGS | |
41 | 41 | |||
42 | -# you must define BINDIR and LIBDIR before installing | 42 | -# you must define BINDIR and LIBDIR before installing | |
43 | -# assumes that BINDIR and LIBDIR exist | 43 | -# assumes that BINDIR and LIBDIR exist | |
44 | +CHGRP?= /usr/bin/chgrp | 44 | +CHGRP?= /usr/bin/chgrp | |
45 | +CHMOD?= /bin/chmod | 45 | +CHMOD?= /bin/chmod | |
46 | +TOUCH?= /usr/bin/touch | 46 | +TOUCH?= /usr/bin/touch | |
47 | + | 47 | + | |
48 | install: | 48 | install: | |
49 | - chmod 755 $(BINDIR) | 49 | - chmod 755 $(BINDIR) | |
50 | - cp moria $(BINDIR) | 50 | - cp moria $(BINDIR) | |
51 | - chmod 4711 $(BINDIR)/moria | 51 | - chmod 4711 $(BINDIR)/moria | |
52 | - chmod 711 $(LIBDIR) | 52 | - chmod 711 $(LIBDIR) | |
53 | - (cd files; cp $(LIBFILES) $(LIBDIR)) | 53 | - (cd files; cp $(LIBFILES) $(LIBDIR)) | |
54 | - (cd $(LIBDIR); chmod 444 $(LIBFILES)) | 54 | - (cd $(LIBDIR); chmod 444 $(LIBFILES)) | |
55 | - (cd $(LIBDIR); touch scores; chmod 644 scores) | 55 | - (cd $(LIBDIR); touch scores; chmod 644 scores) | |
56 | - chown $(OWNER) $(BINDIR)/moria | 56 | - chown $(OWNER) $(BINDIR)/moria | |
57 | - chgrp $(GROUP) $(BINDIR)/moria | 57 | - chgrp $(GROUP) $(BINDIR)/moria | |
58 | - (cd $(LIBDIR); chown $(OWNER) $(LIBFILES) scores) | 58 | - (cd $(LIBDIR); chown $(OWNER) $(LIBFILES) scores) | |
59 | - (cd $(LIBDIR); chgrp $(GROUP) $(LIBFILES) scores) | 59 | - (cd $(LIBDIR); chgrp $(GROUP) $(LIBFILES) scores) | |
60 | -# If you are short on disk space, or aren't interested in debugging moria. | 60 | -# If you are short on disk space, or aren't interested in debugging moria. | |
61 | -# strip $(BINDIR)/moria | 61 | -# strip $(BINDIR)/moria | |
62 | + ${BSD_INSTALL_PROGRAM} moria ${BINDIR} | 62 | + ${BSD_INSTALL_PROGRAM} moria ${DESTDIR}${BINDIR} | |
63 | + ${CHGRP} ${GROUP} ${BINDIR}/moria | 63 | + ${BSD_INSTALL_MAN} doc/moria.6 ${DESTDIR}${MANDIR} | |
64 | + ${CHMOD} g+s ${BINDIR}/moria | 64 | + ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${LIBDIR} | |
65 | + ${BSD_INSTALL_MAN} doc/moria.6 ${MANDIR} | 65 | + ( cd files; ${BSD_INSTALL_DATA} ${LIBFILES} ${DESTDIR}${LIBDIR} ) | |
66 | + ${BSD_INSTALL_DATA_DIR} ${LIBDIR} | |||
67 | + ( cd files; ${BSD_INSTALL_DATA} ${LIBFILES} ${LIBDIR} ) | |||
68 | + ${TOUCH} ${LIBDIR}/scores.dist | |||
69 | + ${CHMOD} 664 ${LIBDIR}/scores.dist | |||
70 | + ${CHGRP} ${GROUP} ${LIBDIR}/scores.dist | |||
71 | + ( cd doc ; ${MAKE} install ) | 66 | + ( cd doc ; ${MAKE} install ) | |
72 | 67 | |||
73 | clean: | 68 | clean: | |
74 | rm -r *.o | 69 | rm -r *.o |
@@ -1,20 +1,20 @@ | @@ -1,20 +1,20 @@ | |||
1 | $NetBSD: patch-al,v 1.1 2002/09/21 04:24:04 simonb Exp $ | 1 | $NetBSD: patch-al,v 1.2 2010/06/25 22:12:31 joerg Exp $ | |
2 | 2 | |||
3 | --- /dev/null Sat Aug 10 17:45:46 2002 | 3 | --- /dev/null Sat Aug 10 17:45:46 2002 | |
4 | +++ doc/Makefile Sat Aug 10 17:48:23 2002 | 4 | +++ doc/Makefile Sat Aug 10 17:48:23 2002 | |
5 | @@ -0,0 +1,15 @@ | 5 | @@ -0,0 +1,15 @@ | |
6 | +DOCDIR= ${PREFIX}/share/doc/moria | 6 | +DOCDIR= ${PREFIX}/share/doc/moria | |
7 | +FILES= ERRORS FEATURES.NEW dragon.inf exp.doc faq history moria.ms moria.txt \ | 7 | +FILES= ERRORS FEATURES.NEW dragon.inf exp.doc faq history moria.ms moria.txt \ | |
8 | + pronounc spells.doc where.inf | 8 | + pronounc spells.doc where.inf | |
9 | + | 9 | + | |
10 | +all: moria.ms moria.txt | 10 | +all: moria.ms moria.txt | |
11 | + | 11 | + | |
12 | +moria.ms: moria1.ms moria2.ms | 12 | +moria.ms: moria1.ms moria2.ms | |
13 | + cat moria1.ms moria2.ms > moria.ms | 13 | + cat moria1.ms moria2.ms > moria.ms | |
14 | + | 14 | + | |
15 | +moria.txt: moria1.txt moria2.txt | 15 | +moria.txt: moria1.txt moria2.txt | |
16 | + cat moria1.txt moria2.txt > moria.txt | 16 | + cat moria1.txt moria2.txt > moria.txt | |
17 | + | 17 | + | |
18 | +install: moria.ms moria.txt | 18 | +install: moria.ms moria.txt | |
19 | + ${BSD_INSTALL_MAN_DIR} ${DOCDIR} | 19 | + ${BSD_INSTALL_MAN_DIR} ${DESTDIR}${DOCDIR} | |
20 | + ${BSD_INSTALL_MAN} ${FILES} ${DOCDIR} | 20 | + ${BSD_INSTALL_MAN} ${FILES} ${DESTDIR}${DOCDIR} |