summaryrefslogtreecommitdiff
path: root/games/angband/Makefile
diff options
context:
space:
mode:
authorMatthew Hunt <mph@FreeBSD.org>1999-12-02 19:19:03 +0000
committerMatthew Hunt <mph@FreeBSD.org>1999-12-02 19:19:03 +0000
commitac7b5b17c7383ea2135d62e7bb51f83126b629a9 (patch)
tree6c4731f029683bd19dbbb304f0c02720b436b12e /games/angband/Makefile
parentd09301b69a2107bd69f5e5212af7716f03cefc85 (diff)
downloadfreebsd-ports-ac7b5b17c7383ea2135d62e7bb51f83126b629a9.zip
Install angband non-sgid, with the following side effects:
- Two directories are mode 1777; the user is alerted to this during "make install". - High score reporting doesn't work, to avoid having a world-writable file. - It is presumably possible for one user to prevent another from playing by creating bogus savefiles in the mode 1777 directories. Frankly, I'm not going to devote my time to solving game-play DoS attacks. Previously, certain files (lib/data) were generated the first time angband was run. These files are now obtained from my directory on www.freebsd.org and are installed during "make install". Several cleanups also, while I'm here. This port is no longer BROKEN.
Diffstat (limited to 'games/angband/Makefile')
-rw-r--r--games/angband/Makefile21
1 files changed, 16 insertions, 5 deletions
diff --git a/games/angband/Makefile b/games/angband/Makefile
index 560604a53cae..97880e00f5c9 100644
--- a/games/angband/Makefile
+++ b/games/angband/Makefile
@@ -9,22 +9,33 @@
DISTNAME= angband-283
PKGNAME= angband-2.8.3
CATEGORIES= games
-MASTER_SITES= ftp://export.andrew.cmu.edu/angband/Source/
-DISTFILES= angband-283.tar.gz ext-x11-283.tar.gz
+MASTER_SITES= ftp://export.andrew.cmu.edu/angband/Source/ \
+ http://www.freebsd.org/~mph/distfiles/
+DISTFILES= angband-283.tar.gz ext-x11-283.tar.gz angband-data.tar.gz
MAINTAINER= mph@freebsd.org
-BROKEN= "Security hole (buffer overflow)"
-
USE_X_PREFIX= yes
DIST_SUBDIR= angband
+EXTRACT_ONLY= angband-283.tar.gz ext-x11-283.tar.gz
+
EXTSRC= ${WRKDIR}/ext-x11-283
pre-patch:
${CP} ${WRKSRC}/src/Makefile.std ${WRKSRC}/src/Makefile
-post-install:
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/angband ${PREFIX}/bin/angband
+ ${MKDIR} ${PREFIX}/lib/X11/angband
+ (cd ${WRKSRC}/lib && ${TAR} cf - * ) | (cd ${PREFIX}/lib/X11/angband && tar xf - )
+ (cd ${PREFIX} && ${TAR} xzf ${DISTDIR}/${DIST_SUBDIR}/angband-data.tar.gz)
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/X11/angband
+ (cd ${PREFIX}/lib/X11/angband && \
+ ${CHMOD} 555 apex bone data edit file help info xtra ; \
+ ${CHMOD} 1777 save user \
+ )
+ ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m 555 /dev/null ${PREFIX}/lib/X11/angband/apex/scores.raw
${INSTALL_DATA} ${EXTSRC}/lib/xtra/tiles.raw \
${PREFIX}/lib/X11/angband/xtra
@${CAT} ${PKGDIR}/MESSAGE