Arch Linux Package

Forum to speak about the first game of the trilogy.

Arch Linux Package

Postby werevire » Tue Jul 12, 2011 6:27 pm

I was planning to create an Arch Linux Package for all three of your games! I would just like to ask your permission first.... and I also have some questions. First off, what lincense is the code under. I can submit code without a license, but it is generally recomended that the code is under one. I was also planning on patching the games so that they save in the user's home directory (this is pretty standard for linux) and so that the data files would be in /usr/share/zelda{title} ( this is preffered by arch users). Thank you so much for making these games!
werevire
 
Posts: 2
Joined: Tue Jul 12, 2011 6:07 pm

Re: Arch Linux Package

Postby werevire » Tue Jul 12, 2011 8:52 pm

Alright, I've created a PKGBUILD file for the game. All the game's save files are stored in /home/$THERE NAME$/.zroth and the games files(images, music, etc) are stored in /usr/share/zroth. The game can be launched by running the command zroth. I might make a desktop file so that it can be launched from menus, but for now I'll wait for you to ok it! Below is the file I'll post to the Archlinux User Repository...
Code: Select all
pkgname=zelda-roth_en
pkgver=6.11
pkgrel=1
pkgdesc="Zelda: Return of the Hylian is a fand made Zelda Game"
url="http://www.zeldaroth.fr/"
arch=('i686' 'x86_64')
depends=('sdl_gfx' 'sdl_mixer' 'sdl_image')
makedepends=()
source=("http://www.zeldaroth.fr/us/files/ROTH/Linux/ZeldaROTH_US-src-linux.zip")
md5sums=('2dbbbb68192904ce9b2fcad542eb2651')

build () {
        cd $srcdir/ZeldaROTH_US-src-linux/src

        # Fix the Game so that it reads save files from $HOME/.zroth
        sed -i -e s~\"data/save/~string\(getenv\(\"HOME\"\)\)+\"/.zroth/~g Joueur.cpp

        #Make the game treat /usr/share/zroth as its data directory
        for i in *.cpp
        do
                sed -i -e s~data/~/usr/share/zroth/~g $i
        done

        # Create the directory $HOME/.zroth if it doesnt exist
        sed -i -e s~'(NULL));'~'&\n\tif (system(\"stat $HOME/.zroth \&> /dev/null")) system (\"mkdir $HOME/.zroth\");'~ main.cpp
        make
}

package () {

        cd $srcdir/ZeldaROTH_US-src-linux/src/

        install -Dm755 ZeldaROTH_US $pkgdir/usr/bin/zroth

        cd data
        for i in {map,music,sound}/*
        do
                install -Dm644 $i $pkgdir/usr/share/zroth/$i
        done

        cd images
        for i in */*
        do
                install -Dm644 $i $pkgdir/usr/share/zroth/images/$i
        done
}
werevire
 
Posts: 2
Joined: Tue Jul 12, 2011 6:07 pm


Return to Zelda ROTH

Who is online

Users browsing this forum: No registered users and 2 guests

cron