diff --git a/alarm/ioquake3-rbp/PKGBUILD b/alarm/ioquake3-rbp/PKGBUILD new file mode 100644 index 000000000..c60666f7c --- /dev/null +++ b/alarm/ioquake3-rbp/PKGBUILD @@ -0,0 +1,99 @@ +# Maintainer: Jason Plum + +buildarch=16 # only rbp + +pkgname=ioquake3-rbp +pkgver=20130111 +pkgrel=1 +pkgdesc='ioquake3 for Raspberry Pi' +arch=('armv6h') +url='http://ioquake3.org/' +license=('GPLv2') +makedepends=('raspberrypi-firmware' 'sdl') +depends=('sdl') +conflicts=('quake3' 'quake3-icculus-svn' 'quake3-svn' 'ioquake3-svn') +provides=('quake3') +replaces=('quake3') +install=ioquake3-rbp.install +source=("ioquake3-build.sh.patch" + 'pointrelease::http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run' + 'quake3.desktop' + 'quake3.launcher' + 'quake3ded.launcher' + ) +md5sums=('c403c68e59caaaefcccd8ef765528f7c' + 'c71fdddccb20e8fc393d846e9c61d685' + '9eca51e2b3ee3e0100944cba436a2a4c' + 'eb58a71452a6f1940baa7f3dc9d25c26' + 'eb58a71452a6f1940baa7f3dc9d25c26' + ) +_gitroot='git@github.com:raspberrypi/quake3.git' +_gitname='master' + + +build() { + cd "${srcdr}" + # clone, depth 1 + git clone $_gitroot $pkgname --depth=1 + + cd "${srcdir}/${pkgname}" + + # patch the build.sh + patch build.sh < "${srcdir}/ioquake3-build.sh.patch" + + # Extract Patch Files + chmod +x ${srcdir}/pointrelease + ${srcdir}/pointrelease --tar xf + + ./build.sh +} + +package() { + cd "${srcdir}/${pkgname}" + + # make the target .. + mkdir -p "${pkgdir}/opt/${pkgname}/baseq3" + mkdir -p "${pkgdir}/opt/${pkgname}/missionpack" + + # Copy the executables + install -m 755 ${srcdir}/${pkgname}/build/release-linux-arm/*.arm \ + "${pkgdir}/opt/${pkgname}/" + + install -D -m 755 ${srcdir}/${pkgname}/build/release-linux-arm/baseq3/*.so \ + ${pkgdir}/opt/${pkgname}/baseq3/ + + install -D -m 755 ${srcdir}/${pkgname}/build/release-linux-arm/missionpack/*.so \ + ${pkgdir}/opt/${pkgname}/missionpack/ + + # modify launcher scripts + /bin/sed -i "s:IOQ3_BINARY:ioquake3.arm:" $srcdir/quake3.launcher + /bin/sed -i "s:IOQ3_BINARY:ioq3ded.arm:" $srcdir/quake3ded.launcher + /bin/sed -i "s:IOQ3_PATH:ioquake3-rbp:" $srcdir/quake3.launcher + /bin/sed -i "s:IOQ3_PATH:ioquake3-rbp:" $srcdir/quake3ded.launcher + + # Install Quake 3 Patch Files + install -m 644 ${srcdir}/${pkgname}/baseq3/*.pk3 \ + ${pkgdir}/opt/${pkgname}/baseq3/ + + # Install Quake 3 Expansion Pack Patch Files + install -m 644 ${srcdir}/${pkgname}/missionpack/*.pk3 \ + ${pkgdir}/opt/${pkgname}/missionpack/ + + # Install Launcher (Client) + install -D -m 755 ${srcdir}/quake3.launcher \ + ${pkgdir}/usr/bin/quake3 + + # Install Launcher (Server) + install -D -m 755 ${srcdir}/quake3ded.launcher \ + ${pkgdir}/usr/bin/quake3ded + + # Install Desktop File + install -D -m 644 ${srcdir}/quake3.desktop \ + ${pkgdir}/usr/share/applications/quake3.desktop + + # Install Icon File + install -D -m 644 ${srcdir}/${pkgname}/misc/quake3.png \ + ${pkgdir}/usr/share/pixmaps/quake3.png +} + +# vim:set ts=2 sw=2 et: diff --git a/alarm/ioquake3-rbp/ioquake3-build.sh.patch b/alarm/ioquake3-rbp/ioquake3-build.sh.patch new file mode 100644 index 000000000..7233e77c0 --- /dev/null +++ b/alarm/ioquake3-rbp/ioquake3-build.sh.patch @@ -0,0 +1,25 @@ +--- build.sh.org 2013-01-11 16:52:50.064204113 +0000 ++++ build.sh 2013-01-11 18:14:24.595441089 +0000 +@@ -5,18 +5,18 @@ + + # directory containing the ARM shared libraries (rootfs, lib/ of SD card) + # specifically libEGL.so and libGLESv2.so +-ARM_LIBS=/opt/bcm-rootfs/opt/vc/lib ++ARM_LIBS=/opt/vc/lib + SDL_LIB=lib + + # directory containing baseq3/ containing .pk3 files - baseq3 on CD +-BASEQ3_DIR="/home/${USER}/" ++BASEQ3_DIR="/opt/ioquake3-rbp/" + + # directory to find khronos linux make files (with include/ containing + # headers! Make needs them.) +-INCLUDES="-I/opt/bcm-rootfs/opt/vc/include -I/opt/bcm-rootfs/opt/vc/include/interface/vcos/pthreads" ++INCLUDES="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads" + + # prefix of arm cross compiler installed +-CROSS_COMPILE=bcm2708- ++CROSS_COMPILE= + + # clean + if [ $# -ge 1 ] && [ $1 = clean ]; then diff --git a/alarm/ioquake3-rbp/ioquake3-rbp.install b/alarm/ioquake3-rbp/ioquake3-rbp.install new file mode 100644 index 000000000..83058344b --- /dev/null +++ b/alarm/ioquake3-rbp/ioquake3-rbp.install @@ -0,0 +1,34 @@ +post_install() { + echo ">>>" + echo ">>>>To play Q3 with the Retail Version:" + echo ">>> Move the pak0.pk3 file from the original game CD to" + echo ">>> /opt/ioquake3-rbp/baseq3/" + echo ">>>" + echo ">>>>To play Q3 with the Demo Version:" + echo ">>> You need the demoq3/pak0.pk3 from the demo installerto " + echo ">>> /opt/ioquake3-rbp/baseq3/" + echo ">>>" + echo ">>>>To play Q3 Team Arena:" + echo ">>> Move the pak0.pk3 file from the Team Arena game CD to" + echo ">>> /opt/ioquake3-rbp/baseq3/" + echo ">>>" + echo ">>>>When you have the .pk3 file(s) installed, run the game:" + echo ">>> quake3" + echo ">>>" + echo ">>>Psst: curl https://dl.dropbox.com/u/1816557/Q3%20Demo%20Paks.zip" +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + /bin/true +} + +op=$1 +shift + +$op $* + + diff --git a/alarm/ioquake3-rbp/quake3.desktop b/alarm/ioquake3-rbp/quake3.desktop new file mode 100644 index 000000000..def702039 --- /dev/null +++ b/alarm/ioquake3-rbp/quake3.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Quake III Arena +GenericName=Quake III +Comment=ioQuake3 - Quake III Open Source Engine +Exec=/usr/bin/quake3 +Icon=/usr/share/pixmaps/quake3.png +StartupNotify=true +Terminal=false +Type=Application +Categories=Qt;KDE;GNOME;Application;Game; + diff --git a/alarm/ioquake3-rbp/quake3.launcher b/alarm/ioquake3-rbp/quake3.launcher new file mode 100644 index 000000000..a859d25ae --- /dev/null +++ b/alarm/ioquake3-rbp/quake3.launcher @@ -0,0 +1,5 @@ +#!/bin/bash + +cd "/opt/IOQ3_PATH" +exec ./IOQ3_BINARY $* + diff --git a/alarm/ioquake3-rbp/quake3ded.launcher b/alarm/ioquake3-rbp/quake3ded.launcher new file mode 100644 index 000000000..a859d25ae --- /dev/null +++ b/alarm/ioquake3-rbp/quake3ded.launcher @@ -0,0 +1,5 @@ +#!/bin/bash + +cd "/opt/IOQ3_PATH" +exec ./IOQ3_BINARY $* +