You are not logged in.

#1 2004-12-07 10:43:36

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

[Games] Tome - Tales of Middle Earth

edit: PKGBUILD and patch updated

here is my second pkgbuild.. its annoying me a bit because the makefile is so badly written.
ive hacked it slightly, but its still acting strangely. I believe it to be the games fault and not mine, but as always i may be wrong.

i dont know how to include links in a pkg.
ive done an ln -s xxx yyy but since the target doesnt exist in the filesystem yet, it cant be done during the build stage.. i assume there is a post-install ability where this would be done.. if anyone could point out how to do this id be greatful, otherwise ill just start `man'ing and figure it out myself.


FYI, the game comes with LUA support, but it compiles and runs fine without it, hence it is not in DEPENDS


PKGBUILD

# Contributor: Adam Griffiths
pkgname=tome
pkgver=227
pkgrel=1
pkgdesc="Tales of Middle Earth is an Angband-based RPG based on the works of J.R.R. Tolkien."
url="http://www.t-o-m-e.net/"
depends=()
conflicts=()
backup=()
install=
source=(http://www.t-o-m-e.net/dl/src/$pkgname-$pkgver-src.tar.bz2)

build() {
  cd $startdir/src/$pkgname-$pkgver-src/src
  patch -Np1 < ../../../$pkgname-$pkgver-makefile.patch
  mv makefile makefile.dos
  cp makefile.std makefile
  make || return 1
  make DESTDIR=$startdir/pkg install
#  ln -s /usr/local/games/tome/tome $startdir/pkg/usr/local/bin/tome
}
md5sums=('3b268d1252fa509ea498bc1d303f5a95')

tome-227-makefile.patch

--- src/makefile.std.orig       2004-12-07 20:13:36.000000000 +1100
+++ src/makefile.std    2004-12-07 22:48:10.000000000 +1100
@@ -78,21 +78,22 @@
 
 # Where lib/ files goes
 #LIBDIR = /usr/lib/games/tome/
+LIBDIR = /usr/local/games/tome
 # Sysadmins of commercial Unix and/or BSD might prefer this
 #LIBDIR = /usr/local/lib/tome/
 # If you like the old default, use this one
-LIBDIR = ./lib/
+#LIBDIR = ./lib/
 # Another example: single user installation using absolute path
 #LIBDIR = /home/myloginname/lib/tome/
 
 
 # Where ToME binary goes
-BINDIR = /usr/local/games
+BINDIR = /usr/local/games/tome
 # Another common location
 #BINDIR = /usr/local/bin
 
 # The game will run suid to this user
-OWNER = games
+GROUP = users
 
 # Ignore this if you're not making a package
 DESTDIR=
@@ -457,10 +458,12 @@
        [ -d $(DESTDIR)$(LIBDIR) ] || mkdir -p $(DESTDIR)$(LIBDIR)
        [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
        cp -r ../lib/* $(DESTDIR)$(LIBDIR)
-       chown -R $(OWNER) $(DESTDIR)$(LIBDIR)
+       chgrp -R $(GROUP) $(DESTDIR)$(LIBDIR)
+       # allow users group write permissions so they can parse the data files
+       chmod -R 775 $(DESTDIR)$(LIBDIR)
        cp -f $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
-       chown $(OWNER) $(DESTDIR)$(BINDIR)/$(TARGET)
-       chmod 4755 $(DESTDIR)$(BINDIR)/$(TARGET)
+#      chgrp $(GROUP) $(DESTDIR)$(BINDIR)/$(TARGET)
+#      chmod 4755 $(DESTDIR)$(BINDIR)/$(TARGET)
 
 # old-install: $(TARGET)
 #      cp $(TARGET) ..

any updates with this messy makefile / pkg would be appreciated, i havent played it yet but it sounds pretty cool.

thanks again.

Offline

#2 2004-12-07 10:59:54

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

Re: [Games] Tome - Tales of Middle Earth

seems to be currently quitting with "/usr/local/games/tome/tome: Cannot load 'v_info.raw' file."

ill try to hunt it down..... grrr.. messy make file

Offline

#3 2004-12-07 11:11:45

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

Re: [Games] Tome - Tales of Middle Earth

it seems that the raw files are generated from text files parsed at run time.
so having them installed to /usr and running it as a normal user means they cant be parsed and the game stops....

grrr

for now run the game as root... ill keep playing with it in a bit

Offline

#4 2004-12-07 12:08:26

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

Re: [Games] Tome - Tales of Middle Earth

ive updated PKGBUILD and makefile patches above.

this has to be the most annoying thing ever..

if the lib directory (data files) arent set to a specific user's home directory, then the parsed files must later be chmod /chown and chgrp'ed to a proper user so everyone else can use them.

if theyre set to a specific users home directory, then no one else has access to them!!!

im not sure what the best way to go about it would be, but for the time being ive set the /usr/local/tome/*/ directories as group user with write permissions.
once a user runs the game they have chowned the parsed files, if another user wants to run it, the files must chown and chgrp'ed

any help would be appreciated

Offline

Board footer

Powered by FluxBB