tags 353552 + patch
thanks dude

The attached patch (also pasted below for convenience) fixes the
problem by installing Falcon's Eye's arch-indep support files to
/usr/share/games/falconseye and putting symlinks to
/usr/share/games/falconseye/* in the /usr/lib/games/falconseye
directory.

Thanks go to Bas Wijnen <shevek at fmf.nl> for suggesting symlinking;
I am a newbie to Debian packaging and would not have thought of that
timesaving idea.

Regards,
Jason Spiro <[EMAIL PROTECTED]>

diff -ruN5 falconseye-1.9.3/debian/falconseye-data.dirs
falconseye-1.9.3-new/debian/falconseye-data.dirs
--- falconseye-1.9.3/debian/falconseye-data.dirs        2006-07-11
22:50:27.000000000 -0400
+++ falconseye-1.9.3-new/debian/falconseye-data.dirs    2006-07-11
23:38:14.000000000 -0400
@@ -1,6 +1,7 @@
usr/lib/games/falconseye
-usr/lib/games/falconseye/config
-usr/lib/games/falconseye/graphics
-usr/lib/games/falconseye/sound
+usr/share/games/falconseye
+usr/share/games/falconseye/config
+usr/share/games/falconseye/graphics
+usr/share/games/falconseye/sound
usr/share/doc/falconseye/manual
usr/share/pixmaps
diff -ruN5 falconseye-1.9.3/debian/rules falconseye-1.9.3-new/debian/rules
--- falconseye-1.9.3/debian/rules       2006-07-11 22:50:27.000000000 -0400
+++ falconseye-1.9.3-new/debian/rules   2006-07-11 23:38:14.000000000 -0400
@@ -31,12 +31,11 @@

build-arch: build-arch-stamp
build-arch-stamp: #CONFIGURE_STAMP# #CONFIG_STATUS#

        sh sys/unix/setup.sh 1
-       $(MAKE) all CFLAGS='-O2 -I../include \
-        -I/usr/X11R6/include -fomit-frame-pointer' LFLAGS='-L/usr/X11R6/lib'
+       $(MAKE) all

build-indep: build-indep-stamp
build-indep-stamp: #CONFIGURE_STAMP# #CONFIG_STATUS#
        
        # Add here commands to compile the indep part of the package.
@@ -61,32 +60,43 @@
        dh_installdirs -i
        
        # Add here commands to install the indep part of the package into
        # debian/<package>-doc.
        #INSTALLDOC#
-       chgrp games debian/falconseye-data/usr/lib/games/falconseye
+       chgrp games debian/falconseye-data/usr/share/games/falconseye
        for file in cmdhelp data help hh history opthelp options \
          oracles rumors wizhelp; \
        do \
          install -m 0644 -o root -g root dat/$$file \
-         debian/falconseye-data/usr/lib/games/falconseye/; \
+         debian/falconseye-data/usr/share/games/falconseye/; \
        done

        install -m 0644 -o root -g root win/jtp/gamedata/config/jtp_lit1.dat \
-         debian/falconseye-data/usr/lib/games/falconseye/config/
+         debian/falconseye-data/usr/share/games/falconseye/config/

        install -m 0644 -o root -g root win/jtp/gamedata/graphics/* \
-         debian/falconseye-data/usr/lib/games/falconseye/graphics/
+         debian/falconseye-data/usr/share/games/falconseye/graphics/
                                                                                
        install -m 0644 -o root -g root win/jtp/gamedata/sound/* \
-         debian/falconseye-data/usr/lib/games/falconseye/sound/
+         debian/falconseye-data/usr/share/games/falconseye/sound/

        install -m 644 -o root -g root win/jtp/gamedata/manual/* \
          debian/falconseye-data/usr/share/doc/falconseye/manual/
                                                                                
        install -m 644 -o root -g root debian/falconseye.xpm \
          debian/falconseye-data/usr/share/pixmaps/
+       
+       # Symlink all files just installed to /usr/lib so that falconseye,
+       # which has not been modified to look in /usr/share for any of its
+       # files, will still find them. This symlinking is easier than
+       # actually patching the source, since falconseye expects to find
+       # all its support files in one directory.
+       
+       for x in debian/falconseye-data/usr/share/games/falconseye/*; do \
+               ln -s /usr/share/games/falconseye/`basename $$x` \
+                 debian/falconseye-data/usr/lib/games/falconseye; \
+       done

install-arch:
        dh_testdir
        dh_testroot
        dh_clean -k -a
diff -ruN5 falconseye-1.9.3/sys/unix/Makefile.top
falconseye-1.9.3-new/sys/unix/Makefile.top
--- falconseye-1.9.3/sys/unix/Makefile.top      2001-06-24 19:57:24.000000000 
-0400
+++ falconseye-1.9.3-new/sys/unix/Makefile.top  2006-07-11
23:49:19.000000000 -0400
@@ -26,20 +26,25 @@
GAMEPERM = 04755
FILEPERM = 0644
EXEPERM  = 0755
DIRPERM  = 0755

-# GAMEDIR also appears in config.h as "HACKDIR".
-# VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR
+# ARCHDIR is the directory where architecture-dependent game files go.
+# INDEPDIR is the directory where architecture-independent game files go.
+# Everything under INDEPDIR gets symlinked into ARCHDIR by debian/rules.
+# See debian/rules for an explanation of why it is symlinked.
+# ARCHDIR also appears in config.h as "HACKDIR".
+# VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else ARCHDIR
#
-# note that 'make install' believes in creating a nice tidy GAMEDIR for
+# note that 'make install' believes in creating a nice tidy ARCHDIR for
# installation, free of debris from previous NetHack versions --
-# therefore there should not be anything in GAMEDIR that you want to keep
+# therefore there should not be anything in ARCHDIR that you want to keep
# (if there is, you'll have to do the installation by hand or modify the
# instructions)
-GAMEDIR  = $(PREFIX)/games/lib/$(GAME)dir
-VARDIR  = $(GAMEDIR)
+ARCHDIR  = $(PREFIX)/games/lib/$(GAME)dir
+INDEPDIR = $(PREFIX)/games/share/$(GAME)dir
+VARDIR  = $(ARCHDIR)
SHELLDIR = $(PREFIX)/games

# per discussion in Install.X11 and Install.Qt
VARDATND =
# VARDATND = x11tiles pet_mark.xbm
@@ -85,15 +90,15 @@

# Falcon's Eye directories. These also appear in jtp_win.h as
# defines JTP_MAIN_DIRECTORY, JTP_DATA_DIRECTORY,
# JTP_GRAPHICS_DIRECTORY and JTP_SOUND_DIRECTORY.
# They are assumed to be subdirectories of the main game directory.
-JTPMAINDIR = $(GAMEDIR)
-JTPDATADIR = $(GAMEDIR)/config
-JTPGRAPHICSDIR = $(GAMEDIR)/graphics
-JTPSOUNDDIR = $(GAMEDIR)/sound
-JTPMANUALDIR = $(GAMEDIR)/manual
+JTPMAINDIR = $(ARCHDIR)
+JTPDATADIR = $(ARCHDIR)/config
+JTPGRAPHICSDIR = $(INDEPDIR)/graphics
+JTPSOUNDDIR = $(ARCHDIR)/sound
+JTPMANUALDIR = $(ARCHDIR)/manual

#
# end of configuration
#

@@ -197,37 +202,37 @@
                -e '}'                                  \
                -e '$$s/.*/nodlb/p' < dat/options` ; \
        $(MAKE) dofiles-$${target-nodlb}
#comment out the next line if you don't want the Falcon's Eye files
        $(MAKE) dofiles-jtp
-       cp src/$(GAME) $(GAMEDIR)
+       cp src/$(GAME) $(ARCHDIR)
        -rm -f $(SHELLDIR)/$(GAME)
-       sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
+       sed -e 's;/usr/games/lib/nethackdir;$(ARCHDIR);' \
                -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
                < sys/unix/nethack.sh \
                > $(SHELLDIR)/$(GAME)
# set up their permissions
-       -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) ; \
+       -( cd $(ARCHDIR) ; $(CHOWN) $(GAMEUID) $(GAME) ; \
                        $(CHGRP) $(GAMEGRP) $(GAME) )
-       chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
+       chmod $(GAMEPERM) $(ARCHDIR)/$(GAME)
        -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
        $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
        chmod $(EXEPERM) $(SHELLDIR)/$(GAME)

dofiles-dlb: check-dlb
-       ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) )
+       ( cd dat ; cp nhdat $(DATNODLB) $(ARCHDIR) )
# set up their permissions
-       -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \
+       -( cd $(ARCHDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \
                        $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \
                        chmod $(FILEPERM) nhdat $(DATNODLB) ; \
        )

dofiles-nodlb:
# copy over the game files
-       ( cd dat ; cp $(DAT) $(GAMEDIR) )
+       ( cd dat ; cp $(DAT) $(ARCHDIR) )
# set up their permissions
-       -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \
+       -( cd $(ARCHDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \
                        $(CHGRP) $(GAMEGRP) $(DAT) ; \
                        chmod $(FILEPERM) $(DAT) )

dofiles-jtp:
# create the Falcon's Eye directories and set up their permissions
@@ -260,15 +265,15 @@
        $(CHGRP) $(GAMEGRP) $(JTPMANUALFILES) ; \
        chmod $(FILEPERM) $(JTPMANUALFILES) )

update: $(GAME) $(VARDAT) dungeon spec_levs
#       (don't yank the old version out from under people who're playing it)
-       -mv $(GAMEDIR)/$(GAME) $(GAMEDIR)/$(GAME).old
+       -mv $(ARCHDIR)/$(GAME) $(ARCHDIR)/$(GAME).old
#       quest.dat is also kept open and has the same problems over NFS
#       (quest.dat may be inside nhdat if dlb is in use)
-       -mv $(GAMEDIR)/quest.dat $(GAMEDIR)/quest.dat.old
-       -mv $(GAMEDIR)/nhdat $(GAMEDIR)/nhdat.old
+       -mv $(ARCHDIR)/quest.dat $(ARCHDIR)/quest.dat.old
+       -mv $(ARCHDIR)/nhdat $(ARCHDIR)/nhdat.old
# set up new versions of the game files
        ( $(MAKE) dofiles )
# touch time-sensitive files
        -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard*
        -touch -c $(VARDIR)/save/*
@@ -278,16 +283,16 @@

install: $(GAME) $(VARDAT) dungeon spec_levs
# set up the directories
# not all mkdirs have -p; those that don't will create a -p directory
        -mkdir -p $(SHELLDIR)
-       -rm -rf $(GAMEDIR) $(VARDIR)
-       -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+       -rm -rf $(ARCHDIR) $(VARDIR)
+       -mkdir -p $(ARCHDIR) $(VARDIR) $(VARDIR)/save
        -rmdir ./-p
-       -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
-       $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
-       chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+       -$(CHOWN) $(GAMEUID) $(ARCHDIR) $(VARDIR) $(VARDIR)/save
+       $(CHGRP) $(GAMEGRP) $(ARCHDIR) $(VARDIR) $(VARDIR)/save
+       chmod $(DIRPERM) $(ARCHDIR) $(VARDIR) $(VARDIR)/save
# set up the game files
        ( $(MAKE) dofiles )
# set up some additional files
        touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile
        -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \

Attachment: tweak-falconseye-file-placements.patch
Description: Binary data

Reply via email to