summaryrefslogtreecommitdiff
path: root/games-fps/quake3-bin
diff options
context:
space:
mode:
Diffstat (limited to 'games-fps/quake3-bin')
-rw-r--r--games-fps/quake3-bin/Manifest6
-rw-r--r--games-fps/quake3-bin/files/q3ded.conf.d5
-rw-r--r--games-fps/quake3-bin/files/q3ded.rc34
-rw-r--r--games-fps/quake3-bin/metadata.xml24
-rw-r--r--games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild105
5 files changed, 174 insertions, 0 deletions
diff --git a/games-fps/quake3-bin/Manifest b/games-fps/quake3-bin/Manifest
new file mode 100644
index 000000000000..a1c828549e5a
--- /dev/null
+++ b/games-fps/quake3-bin/Manifest
@@ -0,0 +1,6 @@
+AUX q3ded.conf.d 193 BLAKE2B 4086b386dee78761016c70f1ac41abab18af899be3df072bddcfea39ce300cf2979c63b765b9050b7b3eb3206d3f9d38071e105db1b49527fcc24eca5f09ef4a SHA512 231ad60874f701efcd85010fbe41d6891db9c7e926d56c88993c5c9025c33884bfb11d83578858cb5b564d2596198cb90da123e67a53e219d08a69c3968e06ff
+AUX q3ded.rc 742 BLAKE2B 920ef23fe62051714850e39e36224fdd2bd7b22b00e77f40a2166582c55e24008286aed21a8acd2b7059940e59ddfac4e2b9b3dbba09c60d07f8bc1900a2c903 SHA512 930b278c0f9ea227b1d64a8167aee72d58ff4f564e46846d4028de8128e66651c47dd52eca12c21e34e3bdbe43a44ae3a6dde6993b556aaf933dad596e027396
+DIST linuxq3apoint-1.32b-3.x86.run 30923961 BLAKE2B 79585534d930a466af58cd34acaac7b9d95da2ad665525b7f7d9ad2e05f3efe5f94b7958b5adca8dd8f687b37d82323a76a701af4bd2cf6011df1e4cc59f4ca9 SHA512 64cff7f8b689e6c801cd68b0f44406a60bd45f83b2544debb8bf1ef7480a1407184a67d2bdafe66e803c0c030b8df6766ce24e48c9e7c610ecf152ed326b7d78
+DIST quake3-1.32c.zip 3056760 BLAKE2B ad328cde18afba538236fac97d76081f69dd2c92c0c4068cb0ec2605ada8a8beb6668dd01d05724d0536db8e3e6668ac64958758510c3e3d9dd674fde8cdcabf SHA512 8bc68d4a1e015e5d5abb88bee1e52cb6375c005d707147869d16383bdbfd37f092a75e8fb3f8678120621433d98de40dcda9dbdbd255a92399caec2c545ff689
+EBUILD quake3-bin-1.32c-r2.ebuild 2999 BLAKE2B 042725801c1116ee1778782bf3f6bc75aa4dd57161789ae0f705effb8f780db3c994fdd989ae070fab59090b06a8b42d15df0665105b060d61608e8c492b98e8 SHA512 64fcd21454b0967b31bdd8481bba00f46429806b4f8a0010e75a8f9c4576d3fd6e5b4ffdee505ede74e4d0db75e402b2bbcebb34605beb1a803334b6ceb03dc1
+MISC metadata.xml 1151 BLAKE2B 1eeb20916d7e617f8171e4be5b19994699c4c154e6aab0aec07f99d6c927d380e350bc48c989de25a0b5e2e52543d35ac81cc8f5044e0c5c713c3d77df009ebc SHA512 3a76be6152f7b32374df36281551036dcf9a98531347b24250c83dd12ad7c267cb0271c8ad747f312e2cdec2a4ff1c8f66b9ee9898fc58f7b9c78092cbc99ecd
diff --git a/games-fps/quake3-bin/files/q3ded.conf.d b/games-fps/quake3-bin/files/q3ded.conf.d
new file mode 100644
index 000000000000..5ecb89b6c445
--- /dev/null
+++ b/games-fps/quake3-bin/files/q3ded.conf.d
@@ -0,0 +1,5 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+q3_OPTS="+set com_hunkmegs 24 +set dedicated 1 +set net_port 27960 +map q3tourney2"
+
diff --git a/games-fps/quake3-bin/files/q3ded.rc b/games-fps/quake3-bin/files/q3ded.rc
new file mode 100644
index 000000000000..1faaf0384e3b
--- /dev/null
+++ b/games-fps/quake3-bin/files/q3ded.rc
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Quake3 dedicated server"
+ screen -A -m -d -S q3ded-bin su - games -c "q3ded-bin ${q3_OPTS}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Quake3 dedicated server"
+ local pid=`screen -list | grep q3ded-bin | awk -F . '{print $1}' | sed -e s/.//`
+ if [[ -z "${pid}" ]] ; then
+ eend 1 "Lost screen session"
+ else
+ pid=`pstree -p ${pid} | sed -e 's:^.*q3ded-bin::'`
+ pid=${pid:1:${#pid}-2}
+ if [[ -z "${pid}" ]] ; then
+ eend 1 "Lost q3ded-bin session"
+ else
+ kill ${pid}
+ eend $? "Could not kill q3ded-bin"
+ fi
+ fi
+}
+
+status() {
+ screen -list | grep q3ded-bin
+}
diff --git a/games-fps/quake3-bin/metadata.xml b/games-fps/quake3-bin/metadata.xml
new file mode 100644
index 000000000000..7af61d9d28bf
--- /dev/null
+++ b/games-fps/quake3-bin/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+Quake III Arena is the third installment of the extremely popular and
+successful Quake series by id software. The game was released by id
+software for both Windows and Linux. The Linux version of the game was
+maintained and sold by the now defunct Loki Entertainment. The powerful
+Quake III engine is the basis for many other commercial games, as id's
+major source of revenue is licensing their game engines. The engine
+allows for user-contributed modifications to be made, allowing the game
+to be extensible and expandable. This game is commercial software, and
+requires the data from a retail copy of the game to play. If you're
+interested in checking out the technology behind Quake III, then
+"emerge quake3-demo" to get the playable demo.
+</longdescription>
+ <use>
+ <flag name="teamarena">Adds support for Team Arena expansion pack</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild b/games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild
new file mode 100644
index 000000000000..e8b0f6c18faf
--- /dev/null
+++ b/games-fps/quake3-bin/quake3-bin-1.32c-r2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="3rd installment of the classic id 3D first-person shooter"
+HOMEPAGE="http://www.idsoftware.com/"
+SRC_URI="mirror://idsoftware/quake3/linux/linuxq3apoint-1.32b-3.x86.run
+ mirror://idsoftware/quake3/quake3-1.32c.zip"
+
+LICENSE="Q3AEULA GPL-2" #gpl for init script bug #425942
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="cdinstall dedicated teamarena"
+RESTRICT="strip"
+
+DEPEND="app-arch/unzip"
+RDEPEND="sys-libs/glibc
+ amd64? ( sys-libs/glibc[multilib] )
+ cdinstall? (
+ games-fps/quake3-data[cdinstall]
+ teamarena? ( games-fps/quake3-teamarena )
+ )
+ dedicated? ( app-misc/screen )
+ !dedicated? (
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ )"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/quake3
+Ddir=${D}/${dir}
+
+QA_TEXTRELS="${dir:1}/pb/pbag.so
+ ${dir:1}/pb/pbcl.so
+ ${dir:1}/pb/pbsv.so"
+
+src_unpack() {
+ unpack_makeself linuxq3apoint-1.32b-3.x86.run
+ unpack quake3-1.32c.zip
+}
+
+src_install() {
+ dodir "${dir}"/{baseq3,missionpack}
+ if use cdinstall ; then
+ dosym "${GAMES_DATADIR}"/quake3/baseq3/pak0.pk3 "${dir}"/baseq3/pak0.pk3
+ use teamarena && dosym "${GAMES_DATADIR}"/quake3/missionpack/pak0.pk3 \
+ "${dir}"/missionpack/pak0.pk3
+ fi
+ for pk3 in baseq3/*.pk3 missionpack/*.pk3 ; do
+ dosym "${GAMES_DATADIR}"/quake3/${pk3} "${dir}"/${pk3}
+ done
+
+ insinto "${dir}"
+ doins -r Docs pb || die "ins docs/pb"
+
+ exeinto "${dir}"
+ doins quake3.xpm README* Q3A_EULA.txt
+ if ! use dedicated ; then
+ doexe "Quake III Arena 1.32c"/linux/quake3*.x86 || die "doexe"
+ games_make_wrapper ${PN} ./quake3.x86 "${dir}" "${dir}"
+ newicon quake3.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "Quake III Arena (binary)"
+ if use teamarena ; then
+ games_make_wrapper ${PN}-teamarena \
+ "./quake3.x86 +set fs_game missionpack" "${dir}" "${dir}"
+ make_desktop_entry ${PN}-teamarena \
+ "Quake III Team Arena (binary)" quake3-bin
+ fi
+ fi
+ doexe "Quake III Arena 1.32c"/linux/q3ded || die "doexe q3ded"
+ games_make_wrapper quake3-ded ./q3ded "${dir}" "${dir}"
+ newinitd "${FILESDIR}"/q3ded.rc quake3-ded
+ newconfd "${FILESDIR}"/q3ded.conf.d quake3-ded
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ ewarn "There are two possible security bugs in this package, both causing a"
+ ewarn "denial of service. One affects the game when running a server, the"
+ ewarn "other when running as a client."
+ ewarn "For more information, please see bug #82149."
+
+ if ! use dedicated; then
+ echo
+ elog "To start the game, run:"
+ elog " quake3-bin"
+ fi
+ echo
+ elog "To start a dedicated server, run"
+ elog " /etc/init.d/quake3-ded start"
+ elog
+ elog "The dedicated server is started under the ${GAMES_USER_DED} user account."
+
+ # IA32 Emulation required for amd64
+ if use amd64 ; then
+ echo
+ ewarn "NOTE: IA32 Emulation must be compiled into your kernel for Quake3 to run."
+ fi
+}