summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-16 03:24:56 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-16 03:24:56 +0000
commitd5fda6568beaec59c25d5d10e7af77bc5c9e81af (patch)
treec241b72caf88f3e63a596fe18b88a93e0387966f /games-server/halflife-steam
parentbump (diff)
downloadhistorical-d5fda6568beaec59c25d5d10e7af77bc5c9e81af.tar.gz
historical-d5fda6568beaec59c25d5d10e7af77bc5c9e81af.tar.bz2
historical-d5fda6568beaec59c25d5d10e7af77bc5c9e81af.zip
update instructions and add init.d script #112526 by Kai Lippok
Package-Manager: portage-2.0.53_rc7
Diffstat (limited to 'games-server/halflife-steam')
-rw-r--r--games-server/halflife-steam/Manifest16
-rw-r--r--games-server/halflife-steam/files/hlds.confd14
-rw-r--r--games-server/halflife-steam/files/hlds.rc38
-rw-r--r--games-server/halflife-steam/halflife-steam-2.0.ebuild28
4 files changed, 85 insertions, 11 deletions
diff --git a/games-server/halflife-steam/Manifest b/games-server/halflife-steam/Manifest
index 36b7ce44a2f2..01cb3a50be8e 100644
--- a/games-server/halflife-steam/Manifest
+++ b/games-server/halflife-steam/Manifest
@@ -1,4 +1,16 @@
-MD5 5ddbf6307af25de9ee8fad90896cffeb halflife-steam-2.0.ebuild 1853
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 d8e625dccd5d18d84dfc2a7bf3875d22 ChangeLog 977
-MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
MD5 1a2fca780fe7fa2572152ebc6327cacb files/digest-halflife-steam-2.0 64
+MD5 5360132b07c2e374ef33c824854dda83 files/hlds.confd 484
+MD5 c48e0a9edc18139fdccf414b4926f589 files/hlds.rc 925
+MD5 7fac7c162e77b378066eb3173f3549d8 halflife-steam-2.0.ebuild 2032
+MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDeqbVgIKl8Uu19MoRAizoAJ9KBgxcBb19rulG9eXQSYp5NIjwRACfRJAq
+OcS6ujznxBmBze0tPrfi5VM=
+=iPp5
+-----END PGP SIGNATURE-----
diff --git a/games-server/halflife-steam/files/hlds.confd b/games-server/halflife-steam/files/hlds.confd
new file mode 100644
index 000000000000..ccea142ce1e1
--- /dev/null
+++ b/games-server/halflife-steam/files/hlds.confd
@@ -0,0 +1,14 @@
+# /etc/conf.d/hlds: config file for halflife steam server
+
+# Path to game
+HLDS_PATH="@GAMESDIR@"
+
+# Machine type: The binary you want to start
+# For Source-based games use the following values:
+# srcds_amd for Athlon and x64 systems
+# srcds_i486 for non-MMX capable machines
+# srcds_i686 on most x86 systems
+#HLDS_MT="srcds_i686"
+
+# Here you can set your start options like game type and maxplayers ...
+HLDS_OPTS="-console -port 27015 -game cstrike +map de_dust +maxplayers 6"
diff --git a/games-server/halflife-steam/files/hlds.rc b/games-server/halflife-steam/files/hlds.rc
new file mode 100644
index 000000000000..14720fe0cec1
--- /dev/null
+++ b/games-server/halflife-steam/files/hlds.rc
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-server/halflife-steam/files/hlds.rc,v 1.1 2005/11/16 03:24:56 vapier Exp $
+
+depend() {
+ use net
+}
+
+checkconfig() {
+ local var
+ for var in HLDS_PATH HLDS_MT HLDS_OPTS ; do
+ if [[ -z ${!var} ]] ; then
+ eerror "Need to set ${var} in /etc/conf.d/HLDS_PATH"
+ return 1
+ fi
+ done
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting Halflife Dedicated Server"
+ export LD_LIBRARY_PATH=${HLDS_PATH}:${HLDS_PATH}/bin:${LD_LIBRARY_PATH}
+ start-stop-daemon --start \
+ --chdir ${HLDS_PATH} -c @GAMES_USER@:@GAMES_GROUP@ \
+ -n ${HLDS_MT} -b -a ${HLDS_PATH}/${HLDS_MT} \
+ -- \
+ -pidfile /var/run/hlds.pid ${HLDS_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Halflife Dedicated Server"
+ start-stop-daemon --stop --pidfile /var/run/hlds.pid
+ eend $?
+}
diff --git a/games-server/halflife-steam/halflife-steam-2.0.ebuild b/games-server/halflife-steam/halflife-steam-2.0.ebuild
index 1ac4cba85f27..0043645f4719 100644
--- a/games-server/halflife-steam/halflife-steam-2.0.ebuild
+++ b/games-server/halflife-steam/halflife-steam-2.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-server/halflife-steam/halflife-steam-2.0.ebuild,v 1.10 2005/09/26 18:19:59 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-server/halflife-steam/halflife-steam-2.0.ebuild,v 1.11 2005/11/16 03:24:56 vapier Exp $
inherit eutils games
@@ -23,9 +23,19 @@ src_unpack() {
src_install() {
exeinto "${GAMES_PREFIX_OPT}"/halflife
- doexe steam
+ doexe steam || die
- games_make_wrapper steam ./steam "${GAMES_PREFIX_OPT}"/halflife
+ newinitd "${FILESDIR}"/hlds.rc hlds
+ sed -i \
+ -e "s:@GAMES_USER@:${GAMES_USER_DED}:" \
+ -e "s:@GAMES_GROUP@:${GAMES_GROUP}:" \
+ "${D}"/etc/init.d/hlds || die "sed init.d"
+ newconfd "${FILESDIR}"/hlds.confd hlds
+ sed -i \
+ -e "s:@GAMESDIR@:${GAMES_PREFIX_OPT}/halflife:" \
+ "${D}"/etc/conf.d/hlds || die "sed conf.d"
+
+ games_make_wrapper steam ./steam "${GAMES_PREFIX_OPT}"/halflife "${GAMES_PREFIX_OPT}"/halflife
prepgamesdirs
}
@@ -36,14 +46,14 @@ pkg_postinst() {
einfo 'Steam Usage ! (note: please do this as root)'
einfo '1. Run `steam` to update itself.'
einfo '2. Run `steam` again to get help menu.'
- einfo '3. Create an account:'
- einfo ' steam -command create -username foobar -email linux1@here.com -password comPlexPass -question "Your hint" -answer "answer"'
- einfo '4. Update the halflife modules you want:'
- einfo " steam -command update -game cstrike -dir ${GAMES_PREFIX_OPT}/halflife -username -email linux1@here.com -password comPlexPass"
- einfo " steam -command update -game tfc -dir ${GAMES_PREFIX_OPT}/halflife -username -email linux1@here.com -password comPlexPass"
- einfo " steam -command update -game valve -dir ${GAMES_PREFIX_OPT}/halflife -username -email linux1@here.com -password comPlexPass"
+ einfo '3. Update the halflife modules you want:'
+ einfo " steam -command update -game 'Counter-Strike Source' -dir ${GAMES_PREFIX_OPT}/halflife"
+ einfo " steam -command update -game cstrike -dir ${GAMES_PREFIX_OPT}/halflife"
+ einfo " steam -command update -game tfc -dir ${GAMES_PREFIX_OPT}/halflife"
+ einfo " steam -command update -game valve -dir ${GAMES_PREFIX_OPT}/halflife"
einfo ' *Note: tfc contains tfc, dmc, and ricochet mods'
einfo '5. After your first update, you only have to run:'
+ einfo ' steam -update "Counter-Strike Source"'
einfo ' steam -update cstrike'
einfo ' steam -update tfc'
einfo ' steam -update valve'