From 9d69aa89c13c076b965426de731c9b82d2a89884 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Sat, 5 Jul 2008 02:49:58 +0000 Subject: [PATCH] [patch] games/tome package-building is broken The package by make package will install fine but it's not possible to start the game. make install runs T.o.M.Es own install script which changes file permissions. This is not done using the binary package. To fix this I have added the corresponding @exec directives to the pkg-plist. While here I added the creation of the plot directory which is not part of the binary package. While here I replaced @dirrm with @dirrmtry directives to make the deinstall less verbose. Problem is T.o.M.E spams the %%DATADIR%% so it won't deinstall cleanly. To make the user aware of this I added a pkg-deinstall script which will emit a corresponding message. PR: ports/125194 Submitted by: Tobias Rehbein Approved by: Peter Thoenen --- games/tome/Makefile | 3 ++ games/tome/files/pkg-deinstall.in | 12 +++++++ games/tome/pkg-plist | 53 +++++++++++++++++-------------- 3 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 games/tome/files/pkg-deinstall.in diff --git a/games/tome/Makefile b/games/tome/Makefile index 3e0170b52e8b..b62279ad7fd6 100644 --- a/games/tome/Makefile +++ b/games/tome/Makefile @@ -7,6 +7,7 @@ PORTNAME= tome PORTVERSION= 2.3.5 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= http://t-o-m-e.net/dl/src/ DISTNAME= tome-235-src @@ -14,6 +15,8 @@ DISTNAME= tome-235-src MAINTAINER= peter.thoenen@yahoo.com COMMENT= Roguelike dungeon exploration game based on JRR Tolkien's works +SUB_FILES= pkg-deinstall + ALL_TARGET= # empty MAKEFILE= makefile.bsd USE_GMAKE= yes diff --git a/games/tome/files/pkg-deinstall.in b/games/tome/files/pkg-deinstall.in new file mode 100644 index 000000000000..cbcbd01bed90 --- /dev/null +++ b/games/tome/files/pkg-deinstall.in @@ -0,0 +1,12 @@ +#!/bin/sh +# $FreeBSD$ + +if [ "$2" = "POST-DEINSTALL" ]; then + echo "" + echo "If you are removing T.o.M.E permanently you should run" + echo "the following command:" + echo "" + echo " rm -rf %%DATADIR%%" + echo "" +fi + diff --git a/games/tome/pkg-plist b/games/tome/pkg-plist index 04342fb6e82c..17890f6df68d 100644 --- a/games/tome/pkg-plist +++ b/games/tome/pkg-plist @@ -1,4 +1,6 @@ bin/tome +@exec chown root:games %F +@exec chmod 2755 %F %%DATADIR%%/apex/.cvsignore %%DATADIR%%/apex/delete.me %%DATADIR%%/apex/scores.raw @@ -446,27 +448,30 @@ bin/tome %%DATADIR%%/xtra/music/delete.me %%DATADIR%%/xtra/sound/Sound.cfg %%DATADIR%%/xtra/sound/readme.txt -@dirrm %%DATADIR%%/xtra/sound -@dirrm %%DATADIR%%/xtra/music -@dirrm %%DATADIR%%/xtra/graf -@dirrm %%DATADIR%%/xtra/font -@dirrm %%DATADIR%%/xtra -@dirrm %%DATADIR%%/user -@dirrm %%DATADIR%%/scpt -@dirrm %%DATADIR%%/save -@dirrm %%DATADIR%%/pref -@dirrm %%DATADIR%%/plot -@dirrm %%DATADIR%%/patch -@dirrm %%DATADIR%%/note -@dirrm %%DATADIR%%/mods -@dirrm %%DATADIR%%/info -@dirrm %%DATADIR%%/help -@dirrm %%DATADIR%%/file -@dirrm %%DATADIR%%/edit -@dirrm %%DATADIR%%/dngn -@dirrm %%DATADIR%%/data -@dirrm %%DATADIR%%/core -@dirrm %%DATADIR%%/cmov -@dirrm %%DATADIR%%/bone -@dirrm %%DATADIR%%/apex -@dirrm %%DATADIR%% +@exec mkdir %D/%%DATADIR%%/plot +@exec chown -R root:games %D/%%DATADIR%% +@exec chmod -R g+w %D/%%DATADIR%% +@dirrmtry %%DATADIR%%/xtra/sound +@dirrmtry %%DATADIR%%/xtra/music +@dirrmtry %%DATADIR%%/xtra/graf +@dirrmtry %%DATADIR%%/xtra/font +@dirrmtry %%DATADIR%%/xtra +@dirrmtry %%DATADIR%%/user +@dirrmtry %%DATADIR%%/scpt +@dirrmtry %%DATADIR%%/save +@dirrmtry %%DATADIR%%/pref +@dirrmtry %%DATADIR%%/plot +@dirrmtry %%DATADIR%%/patch +@dirrmtry %%DATADIR%%/note +@dirrmtry %%DATADIR%%/mods +@dirrmtry %%DATADIR%%/info +@dirrmtry %%DATADIR%%/help +@dirrmtry %%DATADIR%%/file +@dirrmtry %%DATADIR%%/edit +@dirrmtry %%DATADIR%%/dngn +@dirrmtry %%DATADIR%%/data +@dirrmtry %%DATADIR%%/core +@dirrmtry %%DATADIR%%/cmov +@dirrmtry %%DATADIR%%/bone +@dirrmtry %%DATADIR%%/apex +@dirrmtry %%DATADIR%%