2013-05-06 16:43:28 +00:00
|
|
|
# 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
|
|
|
|
only_for_archs="armv6l"
|
2014-07-27 14:05:16 +00:00
|
|
|
hostmakedepends="which pkg-config git"
|
2013-05-06 16:43:28 +00:00
|
|
|
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
|
|
|
|
}
|