You are not logged in.

#1 2004-06-17 19:41:23

Namlook
Member
From: France / Montpellier
Registered: 2004-05-30
Posts: 74

[game : Quake-like] Cube

hey !

This is a PKGBUILD for  Cube a quake-like game. I used a fancy methode to build   this package. If anybody have a more "classic" methode, I interested ! :-D

Becareful, you need to file to build Cube :
- the PKGBUILD
- the file named "Cube"

here are they :

PKGBUILD :

pkgname=cube
pkgver=2004_05_22
pkgrel=1
pkgdesc=" Cube is an open source multiplayer and singleplayer first person shooter game"
url="http://www.cubeengine.com/"
depend=('glut' 'sdl' 'sdl_image' 'sdl_mixer' 'libpng' 'libjpeg' 'zlib')
install=
source=(http://dl.sourceforge.net/sourceforge/cube/cube_2004_05_22.tar.gz)
md5sums=(a0ae899d9af6ab65970d81bf3ccd94ee)

build() {
  mkdir $startdir/pkg/opt
  mkdir -p $startdir/pkg/usr/bin
  cp -r $startdir/src/$pkgname $startdir/pkg/opt
  cp $startdir/cube $startdir/pkg/usr/bin/cube
  chmod 777 $startdir/pkg/usr/bin/cube
}

Cube:

#!/bin/sh
cd /opt/cube
sh cube_unix

Have fun !
Namlook

Offline

#2 2004-06-17 20:34:08

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: [game : Quake-like] Cube

you can create "cube" in the build() to make it easier to handle:

build() { 
  mkdir -p $startdir/pkg/opt 
  mkdir -p $startdir/pkg/usr/bin 
  cp -r $startdir/src/$pkgname $startdir/pkg/opt
  # creating start-script "cube"
  echo '#!/bin/sh '   >    $startdir/pkg/usr/bin/cube 
  echo 'cd /opt/cube' >>   $startdir/pkg/usr/bin/cube 
  echo 'sh cube_unix' >>   $startdir/pkg/usr/bin/cube 
  # and chmod it: (why 7? does it need to be writable?)
  chmod 555 $startdir/pkg/usr/bin/cube 
} 

only a detail, but i personally do try to use the less files the possible and assume that others want this way too


The impossible missions are the only ones which succeed.

Offline

#3 2004-06-17 20:39:09

Evangel
Member
From: Germany - Hechingen/Balingen
Registered: 2004-02-22
Posts: 36

Re: [game : Quake-like] Cube

There are some unsatisfied dependencies:

[rene@osirook cube]$ namcap cube-2004_05_22-1.pkg.tar.gz
cube       E: Dependency detected and not included (sdl)
cube       E: Dependency detected and not included (bash)
cube       W: Library lib/libm.so.6 has no package associated
cube       W: Library usr/lib/libGLcore.so.1 has no package associated
cube       W: Library lib/libpthread.so.0 has no package associated
cube       W: Library lib/libc.so.6 has no package associated
cube       W: Library lib/ld-linux.so.2 has no package associated
cube       W: Library lib/libdl.so.2 has no package associated

Bye,
Eve

Offline

#4 2004-06-17 20:49:43

Namlook
Member
From: France / Montpellier
Registered: 2004-05-30
Posts: 74

Re: [game : Quake-like] Cube

Are you sure that your "namcap" works ? 'cause I don't have (for example)  the lib /usr/lib/libGLcore.so.1

[22:44:26](nc@amaroli)/home/nc$ pacman -Qo /usr/lib/libGLcore.so.1
No package owns /usr/lib/libGLcore.so.1

and Cube works well on my computer...

I put also 'sdl' on the depend option... I don't understand  :cry:

you can create "cube" in the build() to make it easier to handle:

Code:

build() {
  mkdir -p $startdir/pkg/opt
  mkdir -p $startdir/pkg/usr/bin
  cp -r $startdir/src/$pkgname $startdir/pkg/opt
  # creating start-script "cube"
  echo '#!/bin/sh '   >    $startdir/pkg/usr/bin/cube
  echo 'cd /opt/cube' >>   $startdir/pkg/usr/bin/cube
  echo 'sh cube_unix' >>   $startdir/pkg/usr/bin/cube
  # and chmod it: (why 7? does it need to be writable?)
  chmod 555 $startdir/pkg/usr/bin/cube
}

I thought about it but I found that it will be a little "too fancy" on the PKGUILD... but you right ! There is the new PKGBUILD :

pkgname=cube
pkgver=2004_05_22
pkgrel=1
pkgdesc=" Cube is an open source multiplayer and singleplayer first person shooter game"
url="http://www.cubeengine.com/"
depend=('glut' 'sdl' 'sdl_image' 'sdl_mixer' 'libpng' 'libjpeg' 'zlib')
install=
source=(http://dl.sourceforge.net/sourceforge/cube/cube_2004_05_22.tar.gz)
md5sums=(a0ae899d9af6ab65970d81bf3ccd94ee)

build() {
  mkdir -p $startdir/pkg/opt
  mkdir -p $startdir/pkg/usr/bin
  cp -r $startdir/src/$pkgname $startdir/pkg/opt
  # creating start-script "cube"
  echo '#!/bin/sh '   >    $startdir/pkg/usr/bin/cube
  echo 'cd /opt/cube' >>   $startdir/pkg/usr/bin/cube
  echo 'sh cube_unix' >>   $startdir/pkg/usr/bin/cube
  # and chmod it: (why 7? does it need to be writable?)
  chmod 555 $startdir/pkg/usr/bin/cube
} 

Namlook

Offline

#5 2004-06-17 21:00:09

Evangel
Member
From: Germany - Hechingen/Balingen
Registered: 2004-02-22
Posts: 36

Re: [game : Quake-like] Cube

Ah, i see. maybe its because it should be 'depends=' and not 'depend='

Offline

#6 2004-06-17 23:41:02

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: [game : Quake-like] Cube

these missing libs are most probably from a binary graphics driver like nvidia or something this way

as this pkg is not compiled under archlinux (you do not use the source and compile it, but only copy the already compiled files), i suspect that some libs are statically linked into the binaries themselves and do not need the dependences (dont know for sure)

by the way:
you can add at the end of the build() some more code:

   # cleanup of not used files:
   rm -rf $startdir/pkg/opt/cube/source/
   rm -rf $startdir/pkg/opt/cube/bin/

what will remove the windows-binaries and the source-zip from the pkg --- as there is no reason to install them in linux :-)


The impossible missions are the only ones which succeed.

Offline

#7 2004-06-18 08:23:02

Namlook
Member
From: France / Montpellier
Registered: 2004-05-30
Posts: 74

Re: [game : Quake-like] Cube

Ah, i see. maybe its because it should be 'depends=' and not 'depend='

You right ! I fix it.

these missing libs are most probably from a binary graphics driver like nvidia or something this way

as this pkg is not compiled under archlinux (you do not use the source and compile it, but only copy the already compiled files), i suspect that some libs are statically linked into the binaries themselves and do not need the dependences (dont know for sure)

Yes. I tried to compile from source but I got a lot of errors.  :cry:

by the way:
you can add at the end of the build() some more code:
Code:

   # cleanup of not used files:
   rm -rf $startdir/pkg/opt/cube/source/
   rm -rf $startdir/pkg/opt/cube/bin/

what will remove the windows-binaries and the source-zip from the pkg --- as there is no reason to install them in linux

ready ! This is the new PKGBUILD :

pkgname=cube
pkgver=2004_05_22
pkgrel=1
pkgdesc=" Cube is an open source multiplayer and singleplayer first person shooter game"
url="http://www.cubeengine.com/"
depends=('glut' 'sdl' 'sdl_image' 'sdl_mixer' 'libpng' 'libjpeg' 'zlib')
install=
source=(http://dl.sourceforge.net/sourceforge/cube/cube_2004_05_22.tar.gz)
md5sums=(a0ae899d9af6ab65970d81bf3ccd94ee)

build() {
  mkdir -p $startdir/pkg/opt
  mkdir -p $startdir/pkg/usr/bin
  cp -r $startdir/src/$pkgname $startdir/pkg/opt
  # creating start-script "cube"
  echo '#!/bin/sh '   >    $startdir/pkg/usr/bin/cube
  echo 'cd /opt/cube' >>   $startdir/pkg/usr/bin/cube
  echo 'sh cube_unix' >>   $startdir/pkg/usr/bin/cube
  # and chmod it: (why 7? does it need to be writable?)
  chmod 555 $startdir/pkg/usr/bin/cube
   # cleanup of not used files:
   rm -rf $startdir/pkg/opt/cube/source/
   rm -rf $startdir/pkg/opt/cube/bin/
} 

Thanks all guys !  big_smile

Offline

#8 2004-06-18 09:48:29

Evangel
Member
From: Germany - Hechingen/Balingen
Registered: 2004-02-22
Posts: 36

Re: [game : Quake-like] Cube

smile

by the way, what server do you use for playing? This games seems to be real fun. Very fast...

Offline

#9 2004-06-18 12:04:07

Namlook
Member
From: France / Montpellier
Registered: 2004-05-30
Posts: 74

Re: [game : Quake-like] Cube

Well juste choose Multiplayer ->  update server liste from master server and choose your server (be carrefull there are people on the server ;-))

See ya on cube !  tongue

Offline

#10 2004-06-18 13:02:49

Evangel
Member
From: Germany - Hechingen/Balingen
Registered: 2004-02-22
Posts: 36

Re: [game : Quake-like] Cube

Well juste choose Multiplayer -> update server liste from master server and choose your server (be carrefull there are people on the server )

Yes, clear. But i would like to know which server do you prefer.

Offline

#11 2004-06-18 21:27:00

Namlook
Member
From: France / Montpellier
Registered: 2004-05-30
Posts: 74

Re: [game : Quake-like] Cube

big_smile actually the server where there are people  wink

it always change
Namlook

Offline

#12 2004-06-19 17:42:27

super_duper_linux_guy
Member
Registered: 2004-05-28
Posts: 42

Re: [game : Quake-like] Cube

Why doesn't anyone include this as downloadable file for pacman anyway? It looks like a great game, it's open source and it seems to be popular.

Offline

#13 2004-06-19 18:01:31

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: [game : Quake-like] Cube

super_duper_linux_guy wrote:

Why doesn't anyone include this as downloadable file for pacman anyway? It looks like a great game, it's open source and it seems to be popular.

is it difficult to save this PKGBUILD to your harddrive and run "makepkg" in this directory? it has the same effect and is much easier, as nobody need to upload 22MB of data


The impossible missions are the only ones which succeed.

Offline

#14 2004-06-19 18:20:30

super_duper_linux_guy
Member
Registered: 2004-05-28
Posts: 42

Re: [game : Quake-like] Cube

No, that's not what I meant. I was just wondering why it hasn't been done yet. So it's the size? Oke.  smile

Offline

Board footer

Powered by FluxBB