From 310fab2a8da39a5f4e079853bf34d57bdaeb4d8d Mon Sep 17 00:00:00 2001 From: pooka Date: Fri, 14 Apr 2000 14:06:52 +0000 Subject: Don't remove scorefiles and savegame-files, instead notify the user to remove them manually if s/he doesn't want them any more. Install the recover-utility for savegame restoration. --- games/nethack-lib/Makefile | 8 +++++++- games/nethack-lib/files/patch-sum | 4 ++-- games/nethack-lib/patches/patch-ab | 33 +++++++++++++++++++++++++-------- games/nethack-lib/pkg/DEINSTALL | 17 +++++++++++++++++ games/nethack-lib/pkg/PLIST | 7 ++----- 5 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 games/nethack-lib/pkg/DEINSTALL (limited to 'games/nethack-lib') diff --git a/games/nethack-lib/Makefile b/games/nethack-lib/Makefile index f37f37a6be1..9c94c1aedb8 100644 --- a/games/nethack-lib/Makefile +++ b/games/nethack-lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2000/03/27 08:54:55 tron Exp $ +# $NetBSD: Makefile,v 1.6 2000/04/14 14:06:52 pooka Exp $ # DISTNAME= nethack-3.3.0 @@ -14,6 +14,8 @@ CONFIGURE_SCRIPT= ./sys/unix/setup.sh ALL_TARGET= datastuff INSTALL_TARGET= manpages install-dat +DEINSTALL_FILE= ${WRKDIR}/DEINSTALL + pre-configure: @${CHMOD} 755 ${WRKSRC}/sys/unix/setup.sh @@ -22,4 +24,8 @@ post-patch: @${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' <${WRKSRC}/foo> ${WRKSRC}/include/config.h @${RM} -f ${WRKSRC}/foo +post-build: + @cd ${PKGDIR} ; \ + ${SED} -e 's#@PREFIX@#${PREFIX}#' < DEINSTALL > ${DEINSTALL_FILE} + .include "../../mk/bsd.pkg.mk" diff --git a/games/nethack-lib/files/patch-sum b/games/nethack-lib/files/patch-sum index 94cde078c63..4f26bfdb2dd 100644 --- a/games/nethack-lib/files/patch-sum +++ b/games/nethack-lib/files/patch-sum @@ -1,7 +1,7 @@ -$NetBSD: patch-sum,v 1.2 1999/12/24 22:30:00 pooka Exp $ +$NetBSD: patch-sum,v 1.3 2000/04/14 14:06:53 pooka Exp $ MD5 (patch-aa) = ab2e40a9c222d914cc0ca9ecfda1cd88 -MD5 (patch-ab) = 21f70d969186fda8328f8f4a2300cebf +MD5 (patch-ab) = 39341410ce990a7eb55beeef4af75855 MD5 (patch-ac) = 4f89ee35a5901b7b8a8e376216c227ba MD5 (patch-ad) = 1c894f6943c2b5edfcca5e36a6f43c4d MD5 (patch-ae) = 0461964e1047cb98a734dfbe257e8325 diff --git a/games/nethack-lib/patches/patch-ab b/games/nethack-lib/patches/patch-ab index b93e7376145..3b2c20cbdfc 100644 --- a/games/nethack-lib/patches/patch-ab +++ b/games/nethack-lib/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.2 1999/12/24 22:30:00 pooka Exp $ +$NetBSD: patch-ab,v 1.3 2000/04/14 14:06:53 pooka Exp $ --- sys/unix/Makefile.top.orig Sat Dec 11 07:21:05 1999 -+++ sys/unix/Makefile.top Wed Dec 22 20:18:19 1999 ++++ sys/unix/Makefile.top Fri Apr 14 16:44:56 2000 @@ -14,17 +14,16 @@ # MAKE = make @@ -50,13 +50,23 @@ $NetBSD: patch-ab,v 1.2 1999/12/24 22:30:00 pooka Exp $ +all: $(GAME) datastuff @echo "Done." -+datastuff: Guidebook $(VARDAT) dungeon spec_levs check-dlb ++datastuff: Guidebook $(VARDAT) dungeon spec_levs check-dlb recover + @echo "Data Sets Built" + Guidebook: ( cd doc ; $(MAKE) Guidebook ) -@@ -128,7 +130,12 @@ +@@ -88,6 +90,9 @@ + data: + ( cd dat ; $(MAKE) data ) + ++recover: ++ ( cd util ; $(MAKE) recover ) ++ + rumors: + ( cd dat ; $(MAKE) rumors ) + +@@ -128,7 +133,12 @@ ( cd util ; $(MAKE) dlb ) ( cd dat ; ../util/dlb cf nhdat $(DATDLB) ) @@ -70,7 +80,7 @@ $NetBSD: patch-ab,v 1.2 1999/12/24 22:30:00 pooka Exp $ dofiles: target=`sed -n \ -e '/librarian/{' \ -@@ -137,16 +144,13 @@ +@@ -137,16 +147,13 @@ -e '}' \ -e '$$s/.*/nodlb/p' < dat/options` ; \ $(MAKE) dofiles-$${target-nodlb} @@ -88,7 +98,7 @@ $NetBSD: patch-ab,v 1.2 1999/12/24 22:30:00 pooka Exp $ -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) chmod $(EXEPERM) $(SHELLDIR)/$(GAME) -@@ -182,7 +186,7 @@ +@@ -182,10 +189,10 @@ # and a reminder @echo You may also want to install the man pages via the doc Makefile. @@ -96,8 +106,12 @@ $NetBSD: patch-ab,v 1.2 1999/12/24 22:30:00 pooka Exp $ +install-dat: $(VARDAT) dungeon spec_levs # set up the directories -mkdir $(SHELLDIR) - -rm -rf $(GAMEDIR) -@@ -197,6 +201,11 @@ +- -rm -rf $(GAMEDIR) ++# -rm -rf $(GAMEDIR) + -mkdir $(GAMEDIR) $(GAMEDIR)/save + -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(GAMEDIR)/save + $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(GAMEDIR)/save +@@ -197,6 +204,14 @@ -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ $(CHGRP) $(GAMEGRP) perm record logfile ; \ chmod $(FILEPERM) perm record logfile ) @@ -105,6 +119,9 @@ $NetBSD: patch-ab,v 1.2 1999/12/24 22:30:00 pooka Exp $ + cp doc/Guidebook $(PREFIX)/share/doc/nethack + chown $(GAMEUID):$(GAMEGRP) $(PREFIX)/share/doc/nethack/Guidebook + chmod $(FILEPERM) $(PREFIX)/share/doc/nethack/Guidebook ++ cp util/recover $(PREFIX)/bin/recover ++ chown 0:0 $(PREFIX)/bin/recover ++ chmod 755 $(PREFIX)/bin/recover + # and a reminder @echo You may also want to reinstall the man pages via the doc Makefile. diff --git a/games/nethack-lib/pkg/DEINSTALL b/games/nethack-lib/pkg/DEINSTALL new file mode 100644 index 00000000000..66af9cc759f --- /dev/null +++ b/games/nethack-lib/pkg/DEINSTALL @@ -0,0 +1,17 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2000/04/14 14:06:54 pooka Exp $ +# + +case $2 in + DEINSTALL) cat << EOF + +============================================================= +The records, log and savegames were not wiped out by this +deletion process. If you don't want them around, please +remove @PREFIX@/share/nethackdir. +============================================================= + +EOF + ;; +esac diff --git a/games/nethack-lib/pkg/PLIST b/games/nethack-lib/pkg/PLIST index 288232e7a69..e5dc10c9274 100644 --- a/games/nethack-lib/pkg/PLIST +++ b/games/nethack-lib/pkg/PLIST @@ -1,5 +1,6 @@ -@comment $NetBSD: PLIST,v 1.2 1999/12/24 22:30:01 pooka Exp $ +@comment $NetBSD: PLIST,v 1.3 2000/04/14 14:06:54 pooka Exp $ bin/nethack +bin/recover man/man6/nethack.6 man/man6/lev_comp.6 man/man6/dgn_comp.6 @@ -130,8 +131,4 @@ share/nethackdir/help share/nethackdir/rumors share/nethackdir/perm share/doc/nethack/Guidebook -@unexec rm -f %D/share/nethackdir/record -@unexec rm -f %D/share/nethackdir/logfile @dirrm share/doc/nethack -@dirrm share/nethackdir/save -@dirrm share/nethackdir -- cgit v1.2.3