mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
67 lines
2.6 KiB
Bash
67 lines
2.6 KiB
Bash
|
# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
|
||
|
# Maintainer: Eric Belanger <belanger@astro.umontreal.ca>
|
||
|
# Contributor: Peter Baldwin <bald_pete@hotmail.com>
|
||
|
|
||
|
pkgname=cube
|
||
|
pkgver=2005_08_29
|
||
|
pkgrel=9
|
||
|
pkgdesc="Open source multiplayer and singleplayer first person shooter game"
|
||
|
arch=('i686' 'x86_64')
|
||
|
url="http://www.cubeengine.com/"
|
||
|
license=("ZLIB")
|
||
|
depends=('sdl_mixer' 'sdl_image' 'mesa' 'libgl' 'enet')
|
||
|
makedepends=('unzip')
|
||
|
backup=(opt/cube/autoexec.cfg opt/cube/servers.cfg)
|
||
|
install=cube.install
|
||
|
source=(http://downloads.sourceforge.net/sourceforge/cube/${pkgname}_${pkgver}_unix.tar.gz \
|
||
|
http://downloads.sourceforge.net/sourceforge/cube/cube_${pkgver}_src.zip \
|
||
|
cube.xpm cube.desktop cube.sh cubed.sh LICENSE)
|
||
|
md5sums=('e77f3cf85292bf61100d2f8511a254cc' 'e376c49ac209b095cb6d29490834d060'\
|
||
|
'd8c1368a2ac729e168fe3dac7e7bd284' 'a09afc0facfb3f048bcc4d9377af3189'\
|
||
|
'6a2fb52692891df61fc8d240869a5b2e' 'a5f6262cc6274f1a5c244ea0999d13de'\
|
||
|
'f4d9ce2d2b79983f1ef221929cd86a5f')
|
||
|
|
||
|
build() {
|
||
|
# does not work:
|
||
|
# cd $startdir/src/cube_source/enet
|
||
|
# chmod 755 configure
|
||
|
# ./configure --prefix=/usr
|
||
|
# make || return 1
|
||
|
|
||
|
cd $startdir/src/cube_source/src
|
||
|
|
||
|
# trying to use system enet instead of bundled - does not work
|
||
|
# sed -i 's|\.\./enet/include|/usr/include/enet|g' Makefile
|
||
|
# sed -i 's|\.\./enet|/usr/lib|g' Makefile
|
||
|
|
||
|
# workaround compilation error
|
||
|
sed -i 's|pointer|pointer -fpermissive|g' Makefile
|
||
|
|
||
|
# make server || return 1
|
||
|
# make client || return 1
|
||
|
make || return 1
|
||
|
|
||
|
# so we compiled against bundled enet includes but linked with system enet
|
||
|
# I know it is an ugly hack but it's the only way I could build cube
|
||
|
|
||
|
install -d $startdir/pkg/opt
|
||
|
cp -r $startdir/src/cube $startdir/pkg/opt
|
||
|
cd $startdir/pkg/opt/cube
|
||
|
|
||
|
touch servers.cfg packages/base/temp.{cfg,cgz}
|
||
|
chown root:20 servers.cfg autoexec.cfg packages/base/temp.{cfg,cgz}
|
||
|
chown root:20 savegames demos screenshots
|
||
|
chmod 664 servers.cfg autoexec.cfg packages/base/temp.{cfg,cgz}
|
||
|
chmod 775 savegames demos screenshots
|
||
|
|
||
|
install -Dm644 $startdir/src/cube.desktop $startdir/pkg/usr/share/applications/cube.desktop
|
||
|
install -Dm644 $startdir/src/cube.xpm $startdir/pkg/usr/share/pixmaps/cube.xpm
|
||
|
|
||
|
install -D -m755 $startdir/src/cube.sh $startdir/pkg/usr/bin/cube
|
||
|
install -D -m755 $startdir/src/cubed.sh $startdir/pkg/usr/bin/cubed
|
||
|
install -m755 $startdir/src/cube_source/src/cube_client cube_client
|
||
|
install -m755 $startdir/src/cube_source/src/cube_server cube_server
|
||
|
rm -r $startdir/pkg/opt/cube/{bin_unix,cube_unix}
|
||
|
install -D -m644 $startdir/src/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||
|
}
|