You are not logged in.

#1 2009-08-12 08:53:13

Anonymo
Member
Registered: 2005-04-07
Posts: 427
Website

Tremfusion Mercurial (hg) Server [PKGBUILD HELP Request]

I tried installing the package from AUR here: http://aur.archlinux.org/packages.php?ID=28149
Stops after it begins to build.  Tried with Yaourt and with makepkg

So I was looking around the forums and on the Tremfusion page and found that your can build this with hg.  Looking on our forums, I found http://bbs.archlinux.org/viewtopic.php?id=69250 and an example hg PKGBUILD for s2-liplianin DVB drivers.   I took that PKGBUILD and modified the top parts for a new PKGBUILD for Tremfusion.

My background: Noob, no programing skills, no PKGBUILD skills.  If anyone can get this to work, I would appreciate it.  I am learning but it's going slow  sad

Here is the one I was trying to create for 64 bits:

# Maintainer: Raul Castillo <raulmuaddib@gmail.com>
pkgname=bin32-tremfusion-hg
pkgver=1438
pkgrel=1
pkgdesc="Unofficial Update for Tremulous"
arch=('x86_64')
url="http://www.tremfusion.net/hg/tremfusion"
license=('GPL2')
depends=()
makedepends=('mercurial')
optdepends=()
provides=('bin32-tremfusion-hg')
conflicts=()
source=()
md5sums=()
#install=""
_hgroot="http://www.tremfusion.net/hg/tremfusion"
_hgrepo="0.99r3"

build() {
    cd ${startdir}/src

    if [ -d ${_hgrepo} ]; then
        cd ${startdir}/src/${_hgrepo}
        hg pull -u
    else
        hg clone ${_hgroot}${_hgrepo} || return 1
        cd ${startdir}/src/${_hgrepo}
    fi

    msg "Mercurial checkout done or server timeout"
    msg "Starting make..."

    cp -R ${startdir}/src/${_hgrepo} ${startdir}/src/${_hgrepo}-build
    cd ${startdir}/src/${_hgrepo}-build

    make || return 1
    make DESTDIR=${startdir}/pkg install

    rm -rf ${startdir}/src/${_hgrepo}-build
}

From build() {
it is exactly the same as the original for the drivers someone was building.

I was reading the Tremfusion Webpage on building from source:

http://www.tremfusion.net/wiki/Building_from_source

Directions:

To copy the repo in Mercurial, do:

hg clone http://tremfusion.net/hg/tremfusion
cd tremfusion
hg update -C trem-compat

And that should get the latest trem-compat repository. If everything goes right you'll see output like this:

$ hg clone http://tremfusion.net/hg/tremfusion
requesting all changes
adding changesets
adding manifests
adding file changes
added 175 changesets with 1701 changes to 1135 files (+6 heads)
580 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd tremfusion
$ hg update -C trem-compat
over 9000 files updated, 134 files merged, 2 files removed, 0 files unresolved

After that, you should have a new directory in whatever directory you performed the command. The new directory will be named 'tremfusion'.

Whenever you want to update your repository run this command in the tremfusion directory:

hg pull -u

The dependencies it list are:

You'll need the following dev libraries

    * SDL
    * OpenAL
    * Ogg-Vorbis
    * Freetype
    * Ncurses

and Building:

Building

Go into the 'tremfusion' directory and run 'make'

$ make
make[1]: Entering directory `/home/eli/TheMerge/trunk'

Building Tremulous in build/release-linux-x86_64:
  PLATFORM: linux
  ARCH: x86_64
  COMPILE_PLATFORM: linux
  COMPILE_ARCH: x86_64
  CC: cc

...
<snip tons of output from make
...
Q3ASM build/release-linux-x86_64/base/vm/ui.qvm
make[2]: Leaving directory `/home/eli/TheMerge/trunk'
make[1]: Leaving directory `/home/eli/TheMerge/trunk'
$

Now you've got a new directory called 'build'. This will contain a directory based on your architecture. Mine says 'release-linux-x86_64' due to my totally awesome 64-bit OS. Go into that directory and you'll find several files.

    * base - contains the cgame, game and ui libraries that determine most of the game logic. The final qvms are found in base/vm
    * client - contains object files
    * ded - more object files
    * tools - contains tools for making qvms
    * tremded.x86[_64] - the dedicated server binary
    * tremulous.x86[_64] - the client binary 

[edit] Setting up the game

If you run the client binary at this point, you'll see output like this:

tremfusion 0.0.0_HG166 linux-x86_64 Jun 30 2008
----- FS_Startup -----
Couldn't load default.cfg

What this indicates is that the game was trying to load default.cfg, which is the default configuration file. That couldn't be found because the game doesn't have access to it. How do you give the game access to it? You make a pk3.

In the 'tremfusion' directory, under 'misc' you'll find a python program called 'makepk3s.py'. This is the program that automatically builds the pk3s that TremFusion uses. Use the -d option to create the data file (which includes things like menus, graphics, etc).

$ ./makepk3s.py -d
Creating pk3 file at: /home/eli/TheMerge/trunk/misc/tremfusion-data-r0166.pk3
Creating pk3 file at: /home/eli/TheMerge/trunk/misc/tremfusion-game-r0166.pk3

This will give you two new files, tremfusion-data-r0166.pk3 and tremfusion-game-r0166.pk3 (the numbers will differ, depending on your source revision). These need to be put into your game path so that the client binary can find it. You can accomplish this by copying the two files into ~/.tremulous/tremfusion

mkdir ~/.tremulous/tremfusion
cp ./tremfusion-*.pk3 ~/.tremulous/tremfusion

Now you can run the game with

cd build/release-linux-x86[_64]/
./tremulous.x86_64

And you should see something that looks a lot like vanilla Tremulous 1.1.0. That'll change. Soon.

If you have problems, check out our IRC channel at freenode #tremfusion

Offline

#2 2009-08-12 11:36:34

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 716

Re: Tremfusion Mercurial (hg) Server [PKGBUILD HELP Request]

Hmm why dont you fix the tremfusion package ( i am more a fan of release then vcs versions but that is personal ).
You could mail the maintainer , please fix the package if he doesnt return any mail then just mail an TU.

Hmm i have read all the comments from the pkgbuild of tremfusion , there is quiet a discussion. The problem probaly is in the .install since it tries to copy stuff from /opt/bla/bla to ~/.trem  and the files are not in /opt but in /usr/bin.  And the maintainer doesnt want to edit it or so yikes


But your pkgbuilds looks fine except you can replace

 $stardir/src

with $srcdir , it's the same thingfor $startdir/pkg and $pkgdir.

After looking in the pkgbuild for tremfusion , you need to add some lines.  to the PKGBUILD

depends=('tremelous')

You need to let make create packages in $srcdir/usr/local/bin  ( that's what i think it should )

# Copy game data files
install -D -m644 $srcdir/z-tremfusion-menu-0.99r3.pk3 $pkgdir/opt/tremulous/tremfusion/z-tremfusion-menu-0.99r3.pk3
install -D -m644 $srcdir/gamex86.so $pkgdir/opt/tremulous/base/gamex86.so

Then take a look at the .install from the AUR tremfusion package
My lines aren't probaly wrong check where make , makes them

cp /usr/local/bin/tremulous/base/*.pk3 ~/.tremulous/base/"
mkdir ~/.tremulous/tremfusion
cp /opt/tremulous/tremfusion/*tremfusion*.pk3 ~/.tremulous/tremfusion/"
cp /opt/tremulous/base/gamex86.so ~/.tremulous/base/gamex86.so"

I am currently under windows ( *shame* ) , so i can't take a look at the problem or investigate more then this.

Offline

#3 2009-08-12 17:59:00

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 716

Re: Tremfusion Mercurial (hg) Server [PKGBUILD HELP Request]

i fixed the pkgbuild for AUR , here it  is

Offline

#4 2009-08-12 18:52:35

Anonymo
Member
Registered: 2005-04-07
Posts: 427
Website

Re: Tremfusion Mercurial (hg) Server [PKGBUILD HELP Request]

jelly wrote:

i fixed the pkgbuild for AUR , here it  is

Looks like a broken link:
This works to get the PKGBUILD

http://omploader.org/vMjU0MA

Thank you so much Jelly
I will try this out right away.


UPDATE:

Tested, works great, emailing to dax for update on AUR.

Last edited by Anonymo (2009-08-12 19:05:00)

Offline

#5 2009-08-17 12:33:14

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

Re: Tremfusion Mercurial (hg) Server [PKGBUILD HELP Request]

I installed tremfusion with yaourt and executed the commands needed. But i cannot start tremfusion, there is no command called tremfusion and as of what i can see there is no difference with the old tremulous. So how do i start it?

Offline

#6 2009-08-17 12:56:16

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Tremfusion Mercurial (hg) Server [PKGBUILD HELP Request]

You are installing to /usr/local/bin, which is bad. Use /usr/bin instead. This may also solve hatten's problem.

Offline

#7 2009-08-17 17:35:29

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

Re: Tremfusion Mercurial (hg) Server [PKGBUILD HELP Request]

Yep, that solved it. cding into /usr/local/bin and executing tremulous launched tremfusion

although that's only a bad workaround, is it possible to make a symlink in /usr/bin, would that work?

Last edited by hatten (2009-08-17 17:36:18)

Offline

Board footer

Powered by FluxBB