New package: ioquake3-rpi-20130506 (exclusively for the rpi).

This commit is contained in:
Juan RP 2013-05-06 18:43:28 +02:00
parent 816fa6cb6a
commit 5c89c30b4a
5 changed files with 131 additions and 0 deletions

View file

@ -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-rpi/"
# 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=arm-linux-gnueabihf-
# clean
if [ $# -ge 1 ] && [ $1 = clean ]; then

View file

@ -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;

View file

@ -0,0 +1,5 @@
#!/bin/bash
cd "/opt/IOQ3_PATH"
exec ./IOQ3_BINARY $*

View file

@ -0,0 +1,5 @@
#!/bin/bash
cd "/opt/IOQ3_PATH"
exec ./IOQ3_BINARY $*

View file

@ -0,0 +1,84 @@
# Template file for 'ioquake3-rpi'
pkgname=ioquake3-rpi
version=20130506
revision=1
short_desc="ioquake3 for Raspberry Pi"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://ioquake3.org/"
distfiles="http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run"
checksum=c36132c5556b35e01950f1e9c646235033a5130f87ad776ba2bc7becf4f4f186
# XXX only for rpi
noextract=yes
only_for_archs="armv6l"
hostmakedepends="which pkg-config"
makedepends="SDL-devel rpi-firmware"
do_configure() {
# Fetch ioquake3 for rpi
git clone git://github.com/raspberrypi/quake3.git $pkgname --depth=1
cd $pkgname
patch build.sh < ${FILESDIR}/ioquake3-build.sh.patch
sed -e "s,/opt/vc,$XBPS_CROSS_BASE/opt/vc,g" -i build.sh
# Extract Patch Files
cp $XBPS_SRCDISTDIR/linuxq3apoint-1.32b-3.x86.run .
chmod +x linuxq3apoint-1.32b-3.x86.run
./linuxq3apoint-1.32b-3.x86.run --tar xf
}
do_build() {
cd $pkgname
./build.sh
}
do_install() {
vmkdir opt/${pkgname}/baseq3
vmkdir opt/${pkgname}/missionpack
# Copy the executables
install -m755 ${pkgname}/build/release-linux-arm/*.arm \
${DESTDIR}/opt/${pkgname}
install -Dm755 ${pkgname}/build/release-linux-arm/baseq3/*.so \
${DESTDIR}/opt/${pkgname}/baseq3/
install -Dm755 ${pkgname}/build/release-linux-arm/missionpack/*.so \
${DESTDIR}/opt/${pkgname}/missionpack/
# modify launcher scripts
cp ${FILESDIR}/quake3.launcher .
cp ${FILESDIR}/quake3ded.launcher .
sed -i "s:IOQ3_BINARY:ioquake3.arm:" quake3.launcher
sed -i "s:IOQ3_BINARY:ioq3ded.arm:" quake3ded.launcher
sed -i "s:IOQ3_PATH:ioquake3-rpi:" quake3.launcher
sed -i "s:IOQ3_PATH:ioquake3-rpi:" quake3ded.launcher
# Install Quake 3 Patch Files
install -m644 ${pkgname}/baseq3/*.pk3 \
${DESTDIR}/opt/${pkgname}/baseq3/
# Install Quake 3 Expansion Pack Patch Files
install -m644 ${pkgname}/missionpack/*.pk3 \
${DESTDIR}/opt/${pkgname}/missionpack/
# Install Launcher (Client)
vinstall quake3.launcher 755 usr/bin quake3
# Install Launcher (Server)
vinstall quake3ded.launcher 755 usr/bin quake3ded
# Install Desktop File
vinstall ${FILESDIR}/quake3.desktop 644 usr/share/applications
# Install Icon File
vinstall ${pkgname}/misc/quake3.png 644 usr/share/pixmaps
}
ioquake3-rpi_package() {
pkg_install() {
vmove all
}
}