summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conrad@kostecki.com>2018-06-22 11:07:07 +0200
committerMichał Górny <mgorny@gentoo.org>2018-06-22 20:39:47 +0200
commit5bc006637ea7b908a0ce13f45687f34b32466a55 (patch)
tree97e5f26d9c4e218a5ce8483a70a8684351e11e87 /games-server/steamcmd
parentprofiles/license_groups: add SteamCMD license to EULA group (diff)
downloadgentoo-5bc006637ea7b908a0ce13f45687f34b32466a55.tar.gz
gentoo-5bc006637ea7b908a0ce13f45687f34b32466a55.tar.bz2
gentoo-5bc006637ea7b908a0ce13f45687f34b32466a55.zip
games-server/steamcmd: New package
Closes: https://bugs.gentoo.org/652236 Closes: https://github.com/gentoo/gentoo/pull/7776 Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'games-server/steamcmd')
-rw-r--r--games-server/steamcmd/Manifest1
-rw-r--r--games-server/steamcmd/files/README.gentoo42
-rw-r--r--games-server/steamcmd/files/steamcmd.confd15
-rw-r--r--games-server/steamcmd/files/steamcmd.initd32
-rw-r--r--games-server/steamcmd/metadata.xml18
-rw-r--r--games-server/steamcmd/steamcmd-1.0.ebuild51
6 files changed, 159 insertions, 0 deletions
diff --git a/games-server/steamcmd/Manifest b/games-server/steamcmd/Manifest
new file mode 100644
index 000000000000..e001f61616cb
--- /dev/null
+++ b/games-server/steamcmd/Manifest
@@ -0,0 +1 @@
+DIST steamcmd-1.0.tar.gz 2428561 BLAKE2B c51dbb8c7731222eb748508b8a84a4cbda55168c85116078074bd0da85018a344ca088b7af41a07a96c15e64d0aeb28fb90cd85d99f444e9425f5a326c1823fe SHA512 b37debfa45e5578cc065924770258a026adad339aae86da1a66e71ac4ee80d2ddbca9060ca4c734affd2c6902635e7b32e2b3efe11bb600969654b3abeb3839e
diff --git a/games-server/steamcmd/files/README.gentoo b/games-server/steamcmd/files/README.gentoo
new file mode 100644
index 000000000000..70f027bb8044
--- /dev/null
+++ b/games-server/steamcmd/files/README.gentoo
@@ -0,0 +1,42 @@
+Before you can start installing your favourite dedicated server,
+you must let SteamCMD do update itself.
+You can do this, by running SteamCMD itself:
+
+cd /opt/steamcmd
+runuser -l steamcmd -c './steamcmd.sh' -s /bin/bash
+
+On the first run, you will see, that SteamCMD starts updating itself.
+After that, SteamCMD is ready to go
+for installing your favourite dedicated server.
+
+Please keep in mind: You should not run SteamCMD as root!
+
+This package provides an init script and a conf file.
+Don't modify those files directly,
+but instead make a symlink of that init script
+and a copy of that conf file.
+You would do this for every server, you want to setup.
+
+For example, you wan't to setup an old Counter-Strike 1.6 server,
+you would do:
+
+cd /etc/init.d
+ln -s steamcmd steamcmd.cstrike
+
+cd /etc/conf.d
+cp steamcmd steamcmd.cstrike
+
+After that, make your settings in /etc/conf.d/steamcmd.cstrike
+
+In order to install with SteamCMD a dedicated server,
+for example CS 1.6, please run:
+
+cd /opt/steamcmd
+./steamcmd.sh +login anonymous +force_install_dir /opt/steamcmd/hlds +app_set_config 90 mod cstrike +app_update 90 validate +quit
+
+While you can use any path for '+force_install_dir', it's recommended to use:
+'/opt/steamcmd/hlds' for older HL1 based mods.
+'/opt/steamcmd/srcds' for newer HL2 based mods.
+
+For more information, please visit the Valve Developer Community:
+https://developer.valvesoftware.com/wiki/SteamCMD
diff --git a/games-server/steamcmd/files/steamcmd.confd b/games-server/steamcmd/files/steamcmd.confd
new file mode 100644
index 000000000000..dcaf8036b88a
--- /dev/null
+++ b/games-server/steamcmd/files/steamcmd.confd
@@ -0,0 +1,15 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Specifies, which server binary is used.
+# This could be 'hlds_run' or 'srcds_run', depending on your game.
+STEAMCMD_BINARY="hlds_run"
+
+# Path to the files of your started server.
+# It's recommended to use:
+# '/opt/steamcmd/hlds' for older HL1 based mods.
+# '/opt/steamcmd/srcds' for newer HL2 based mods.
+STEAMCMD_PATH="/opt/steamcmd/hlds"
+
+# Options for your server binary.
+STEAMCMD_OPTS="-game valve +ip 127.0.0.1 +maxplayers 32 +map crossfire -pingboost 3"
diff --git a/games-server/steamcmd/files/steamcmd.initd b/games-server/steamcmd/files/steamcmd.initd
new file mode 100644
index 000000000000..fecd30e3079b
--- /dev/null
+++ b/games-server/steamcmd/files/steamcmd.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ "${SVCNAME}" = "steamcmd" ]; then
+ instance="main"
+else
+ instance="${SVCNAME#steamcmd.}"
+fi
+
+name="SteamCMD (Mod: ${instance})"
+pidfile="/run/steamcmd.${instance}.pid"
+screen_name="steamcmd.${instance}"
+start_stop_daemon_args="--chdir ${STEAMCMD_PATH}"
+
+command="screen"
+command_args="-DmUS ${screen_name} ${STEAMCMD_PATH}/${STEAMCMD_BINARY} ${STEAMCMD_OPTS}"
+command_background="true"
+command_group="steamcmd"
+command_user="steamcmd"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ if [ -z "$STEAMCMD_BINARY" ] || [ -z "$STEAMCMD_PATH" ] || [ -z "$STEAMCMD_OPTS" ]; then
+ eerror "One or more STEAMCMD_* variables in /etc/conf.d/steamcmd.${SVCNAME} are not set!"
+ return 1
+ fi
+ return 0
+}
diff --git a/games-server/steamcmd/metadata.xml b/games-server/steamcmd/metadata.xml
new file mode 100644
index 000000000000..7b05247dc78f
--- /dev/null
+++ b/games-server/steamcmd/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ck+gentoo@bl4ckb0x.de</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ The Steam Console Client or SteamCMD is a command-line version of the Steam client.
+ Its primary use is to install and update various dedicated servers available on Steam
+ using a command-line interface. It works with games that use the SteamPipe content system.
+ All games have been migrated from the deprecated HLDSUpdateTool to SteamCMD.
+ </longdescription>
+</pkgmetadata>
diff --git a/games-server/steamcmd/steamcmd-1.0.ebuild b/games-server/steamcmd/steamcmd-1.0.ebuild
new file mode 100644
index 000000000000..0d2067a30692
--- /dev/null
+++ b/games-server/steamcmd/steamcmd-1.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit readme.gentoo-r1 user
+
+DESCRIPTION="This is the command-line version of the Steam client for dedicated servers"
+HOMEPAGE="https://developer.valvesoftware.com/wiki/SteamCMD"
+SRC_URI="https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1+ Steam"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+RDEPEND="app-misc/screen"
+
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/steamcmd/linux32/libstdc++.so.6
+ opt/steamcmd/linux32/steamcmd"
+
+pkg_setup() {
+ enewgroup steamcmd
+ enewuser steamcmd -1 -1 /opt/steamcmd steamcmd
+}
+
+src_install() {
+ diropts -o steamcmd -g steamcmd
+ dodir /opt/steamcmd
+ keepdir /opt/steamcmd/{.steam,.steam/sdk32,linux32}
+
+ exeopts -o steamcmd -g steamcmd
+ exeinto /opt/steamcmd
+ doexe steamcmd.sh
+
+ exeopts -o steamcmd -g steamcmd
+ exeinto /opt/steamcmd/linux32
+ doexe linux32/steamcmd linux32/libstdc++.so.6
+
+ newinitd "${FILESDIR}"/steamcmd.initd steamcmd
+ newconfd "${FILESDIR}"/steamcmd.confd steamcmd
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}