Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-server/steamcmd/, games-server/steamcmd/files/
Date: Fri, 22 Jun 2018 18:40:19
Message-Id: 1529692787.5bc006637ea7b908a0ce13f45687f34b32466a55.mgorny@gentoo
1 commit: 5bc006637ea7b908a0ce13f45687f34b32466a55
2 Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com>
3 AuthorDate: Fri Jun 22 09:07:07 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 22 18:39:47 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bc00663
7
8 games-server/steamcmd: New package
9
10 Closes: https://bugs.gentoo.org/652236
11 Closes: https://github.com/gentoo/gentoo/pull/7776
12 Package-Manager: Portage-2.3.40, Repoman-2.3.9
13
14 games-server/steamcmd/Manifest | 1 +
15 games-server/steamcmd/files/README.gentoo | 42 ++++++++++++++++++++++++
16 games-server/steamcmd/files/steamcmd.confd | 15 +++++++++
17 games-server/steamcmd/files/steamcmd.initd | 32 +++++++++++++++++++
18 games-server/steamcmd/metadata.xml | 18 +++++++++++
19 games-server/steamcmd/steamcmd-1.0.ebuild | 51 ++++++++++++++++++++++++++++++
20 6 files changed, 159 insertions(+)
21
22 diff --git a/games-server/steamcmd/Manifest b/games-server/steamcmd/Manifest
23 new file mode 100644
24 index 00000000000..e001f61616c
25 --- /dev/null
26 +++ b/games-server/steamcmd/Manifest
27 @@ -0,0 +1 @@
28 +DIST steamcmd-1.0.tar.gz 2428561 BLAKE2B c51dbb8c7731222eb748508b8a84a4cbda55168c85116078074bd0da85018a344ca088b7af41a07a96c15e64d0aeb28fb90cd85d99f444e9425f5a326c1823fe SHA512 b37debfa45e5578cc065924770258a026adad339aae86da1a66e71ac4ee80d2ddbca9060ca4c734affd2c6902635e7b32e2b3efe11bb600969654b3abeb3839e
29
30 diff --git a/games-server/steamcmd/files/README.gentoo b/games-server/steamcmd/files/README.gentoo
31 new file mode 100644
32 index 00000000000..70f027bb804
33 --- /dev/null
34 +++ b/games-server/steamcmd/files/README.gentoo
35 @@ -0,0 +1,42 @@
36 +Before you can start installing your favourite dedicated server,
37 +you must let SteamCMD do update itself.
38 +You can do this, by running SteamCMD itself:
39 +
40 +cd /opt/steamcmd
41 +runuser -l steamcmd -c './steamcmd.sh' -s /bin/bash
42 +
43 +On the first run, you will see, that SteamCMD starts updating itself.
44 +After that, SteamCMD is ready to go
45 +for installing your favourite dedicated server.
46 +
47 +Please keep in mind: You should not run SteamCMD as root!
48 +
49 +This package provides an init script and a conf file.
50 +Don't modify those files directly,
51 +but instead make a symlink of that init script
52 +and a copy of that conf file.
53 +You would do this for every server, you want to setup.
54 +
55 +For example, you wan't to setup an old Counter-Strike 1.6 server,
56 +you would do:
57 +
58 +cd /etc/init.d
59 +ln -s steamcmd steamcmd.cstrike
60 +
61 +cd /etc/conf.d
62 +cp steamcmd steamcmd.cstrike
63 +
64 +After that, make your settings in /etc/conf.d/steamcmd.cstrike
65 +
66 +In order to install with SteamCMD a dedicated server,
67 +for example CS 1.6, please run:
68 +
69 +cd /opt/steamcmd
70 +./steamcmd.sh +login anonymous +force_install_dir /opt/steamcmd/hlds +app_set_config 90 mod cstrike +app_update 90 validate +quit
71 +
72 +While you can use any path for '+force_install_dir', it's recommended to use:
73 +'/opt/steamcmd/hlds' for older HL1 based mods.
74 +'/opt/steamcmd/srcds' for newer HL2 based mods.
75 +
76 +For more information, please visit the Valve Developer Community:
77 +https://developer.valvesoftware.com/wiki/SteamCMD
78
79 diff --git a/games-server/steamcmd/files/steamcmd.confd b/games-server/steamcmd/files/steamcmd.confd
80 new file mode 100644
81 index 00000000000..dcaf8036b88
82 --- /dev/null
83 +++ b/games-server/steamcmd/files/steamcmd.confd
84 @@ -0,0 +1,15 @@
85 +# Copyright 1999-2018 Gentoo Foundation
86 +# Distributed under the terms of the GNU General Public License v2
87 +
88 +# Specifies, which server binary is used.
89 +# This could be 'hlds_run' or 'srcds_run', depending on your game.
90 +STEAMCMD_BINARY="hlds_run"
91 +
92 +# Path to the files of your started server.
93 +# It's recommended to use:
94 +# '/opt/steamcmd/hlds' for older HL1 based mods.
95 +# '/opt/steamcmd/srcds' for newer HL2 based mods.
96 +STEAMCMD_PATH="/opt/steamcmd/hlds"
97 +
98 +# Options for your server binary.
99 +STEAMCMD_OPTS="-game valve +ip 127.0.0.1 +maxplayers 32 +map crossfire -pingboost 3"
100
101 diff --git a/games-server/steamcmd/files/steamcmd.initd b/games-server/steamcmd/files/steamcmd.initd
102 new file mode 100644
103 index 00000000000..fecd30e3079
104 --- /dev/null
105 +++ b/games-server/steamcmd/files/steamcmd.initd
106 @@ -0,0 +1,32 @@
107 +#!/sbin/openrc-run
108 +# Copyright 1999-2018 Gentoo Foundation
109 +# Distributed under the terms of the GNU General Public License v2
110 +
111 +if [ "${SVCNAME}" = "steamcmd" ]; then
112 + instance="main"
113 +else
114 + instance="${SVCNAME#steamcmd.}"
115 +fi
116 +
117 +name="SteamCMD (Mod: ${instance})"
118 +pidfile="/run/steamcmd.${instance}.pid"
119 +screen_name="steamcmd.${instance}"
120 +start_stop_daemon_args="--chdir ${STEAMCMD_PATH}"
121 +
122 +command="screen"
123 +command_args="-DmUS ${screen_name} ${STEAMCMD_PATH}/${STEAMCMD_BINARY} ${STEAMCMD_OPTS}"
124 +command_background="true"
125 +command_group="steamcmd"
126 +command_user="steamcmd"
127 +
128 +depend() {
129 + use net
130 +}
131 +
132 +start_pre() {
133 + if [ -z "$STEAMCMD_BINARY" ] || [ -z "$STEAMCMD_PATH" ] || [ -z "$STEAMCMD_OPTS" ]; then
134 + eerror "One or more STEAMCMD_* variables in /etc/conf.d/steamcmd.${SVCNAME} are not set!"
135 + return 1
136 + fi
137 + return 0
138 +}
139
140 diff --git a/games-server/steamcmd/metadata.xml b/games-server/steamcmd/metadata.xml
141 new file mode 100644
142 index 00000000000..7b05247dc78
143 --- /dev/null
144 +++ b/games-server/steamcmd/metadata.xml
145 @@ -0,0 +1,18 @@
146 +<?xml version="1.0" encoding="UTF-8"?>
147 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
148 +<pkgmetadata>
149 + <maintainer type="person">
150 + <email>ck+gentoo@××××××××.de</email>
151 + <name>Conrad Kostecki</name>
152 + </maintainer>
153 + <maintainer type="project">
154 + <email>proxy-maint@g.o</email>
155 + <name>Proxy Maintainers</name>
156 + </maintainer>
157 + <longdescription>
158 + The Steam Console Client or SteamCMD is a command-line version of the Steam client.
159 + Its primary use is to install and update various dedicated servers available on Steam
160 + using a command-line interface. It works with games that use the SteamPipe content system.
161 + All games have been migrated from the deprecated HLDSUpdateTool to SteamCMD.
162 + </longdescription>
163 +</pkgmetadata>
164
165 diff --git a/games-server/steamcmd/steamcmd-1.0.ebuild b/games-server/steamcmd/steamcmd-1.0.ebuild
166 new file mode 100644
167 index 00000000000..0d2067a3069
168 --- /dev/null
169 +++ b/games-server/steamcmd/steamcmd-1.0.ebuild
170 @@ -0,0 +1,51 @@
171 +# Copyright 1999-2018 Gentoo Foundation
172 +# Distributed under the terms of the GNU General Public License v2
173 +
174 +EAPI=6
175 +
176 +inherit readme.gentoo-r1 user
177 +
178 +DESCRIPTION="This is the command-line version of the Steam client for dedicated servers"
179 +HOMEPAGE="https://developer.valvesoftware.com/wiki/SteamCMD"
180 +SRC_URI="https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -> ${P}.tar.gz"
181 +
182 +LICENSE="LGPL-2.1+ Steam"
183 +SLOT="0"
184 +KEYWORDS="-* ~amd64 ~x86"
185 +
186 +RDEPEND="app-misc/screen"
187 +
188 +RESTRICT="bindist mirror"
189 +
190 +S="${WORKDIR}"
191 +
192 +QA_PREBUILT="opt/steamcmd/linux32/libstdc++.so.6
193 + opt/steamcmd/linux32/steamcmd"
194 +
195 +pkg_setup() {
196 + enewgroup steamcmd
197 + enewuser steamcmd -1 -1 /opt/steamcmd steamcmd
198 +}
199 +
200 +src_install() {
201 + diropts -o steamcmd -g steamcmd
202 + dodir /opt/steamcmd
203 + keepdir /opt/steamcmd/{.steam,.steam/sdk32,linux32}
204 +
205 + exeopts -o steamcmd -g steamcmd
206 + exeinto /opt/steamcmd
207 + doexe steamcmd.sh
208 +
209 + exeopts -o steamcmd -g steamcmd
210 + exeinto /opt/steamcmd/linux32
211 + doexe linux32/steamcmd linux32/libstdc++.so.6
212 +
213 + newinitd "${FILESDIR}"/steamcmd.initd steamcmd
214 + newconfd "${FILESDIR}"/steamcmd.confd steamcmd
215 +
216 + readme.gentoo_create_doc
217 +}
218 +
219 +pkg_postinst() {
220 + readme.gentoo_print_elog
221 +}