Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-server/steamcmd/, games-server/steamcmd/files/
Date: Mon, 10 Sep 2018 13:23:57
Message-Id: 1536585808.adddad6312b1de41a1570d2529cf71fdb68d25fb.monsieurp@gentoo
1 commit: adddad6312b1de41a1570d2529cf71fdb68d25fb
2 Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com>
3 AuthorDate: Tue Sep 4 21:23:54 2018 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 10 13:23:28 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adddad63
7
8 games-server/steamcmd: don't set default values for conf.d.
9
10 Also bump to EAPI=7.
11
12 Closes: https://bugs.gentoo.org/665158
13 Package-Manager: Portage-2.3.48, Repoman-2.3.10
14 Closes: https://github.com/gentoo/gentoo/pull/9781
15
16 games-server/steamcmd/files/steamcmd.confd-r1 | 15 ++++++++
17 games-server/steamcmd/files/steamcmd.initd-r1 | 32 +++++++++++++++++
18 games-server/steamcmd/steamcmd-1.0-r1.ebuild | 51 +++++++++++++++++++++++++++
19 3 files changed, 98 insertions(+)
20
21 diff --git a/games-server/steamcmd/files/steamcmd.confd-r1 b/games-server/steamcmd/files/steamcmd.confd-r1
22 new file mode 100644
23 index 00000000000..b5d8b419849
24 --- /dev/null
25 +++ b/games-server/steamcmd/files/steamcmd.confd-r1
26 @@ -0,0 +1,15 @@
27 +# Copyright 1999-2018 Gentoo Foundation
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +# Specifies, which server binary is used.
31 +# This could be 'hlds_run' or 'srcds_run', depending on your game.
32 +# STEAMCMD_BINARY="hlds_run"
33 +
34 +# Path to the files of your started server.
35 +# It's recommended to use:
36 +# '/opt/steamcmd/hlds' for older HL1 based mods.
37 +# '/opt/steamcmd/srcds' for newer HL2 based mods.
38 +# STEAMCMD_PATH="/opt/steamcmd/hlds"
39 +
40 +# Options for your server binary.
41 +# STEAMCMD_OPTS="-game valve +ip 127.0.0.1 +maxplayers 32 +map crossfire -pingboost 3"
42
43 diff --git a/games-server/steamcmd/files/steamcmd.initd-r1 b/games-server/steamcmd/files/steamcmd.initd-r1
44 new file mode 100644
45 index 00000000000..327b47734ec
46 --- /dev/null
47 +++ b/games-server/steamcmd/files/steamcmd.initd-r1
48 @@ -0,0 +1,32 @@
49 +#!/sbin/openrc-run
50 +# Copyright 1999-2018 Gentoo Foundation
51 +# Distributed under the terms of the GNU General Public License v2
52 +
53 +if [ "${SVCNAME}" = "steamcmd" ]; then
54 + instance="main"
55 +else
56 + instance="${SVCNAME#steamcmd.}"
57 +fi
58 +
59 +name="SteamCMD (Mod: ${instance})"
60 +pidfile="/run/steamcmd.${instance}.pid"
61 +screen_name="steamcmd.${instance}"
62 +start_stop_daemon_args="--chdir ${STEAMCMD_PATH}"
63 +
64 +command="screen"
65 +command_args="-DmUS ${screen_name} ${STEAMCMD_PATH}/${STEAMCMD_BINARY} ${STEAMCMD_OPTS}"
66 +command_background="true"
67 +command_group="steamcmd"
68 +command_user="steamcmd"
69 +
70 +depend() {
71 + use net
72 +}
73 +
74 +start_pre() {
75 + if [ -z "${STEAMCMD_BINARY}" ] || [ -z "${STEAMCMD_PATH}" ]; then
76 + eerror "One or more STEAMCMD_* variables in /etc/conf.d/steamcmd.${SVCNAME} are not set!"
77 + return 1
78 + fi
79 + return 0
80 +}
81
82 diff --git a/games-server/steamcmd/steamcmd-1.0-r1.ebuild b/games-server/steamcmd/steamcmd-1.0-r1.ebuild
83 new file mode 100644
84 index 00000000000..15a46975d10
85 --- /dev/null
86 +++ b/games-server/steamcmd/steamcmd-1.0-r1.ebuild
87 @@ -0,0 +1,51 @@
88 +# Copyright 1999-2018 Gentoo Foundation
89 +# Distributed under the terms of the GNU General Public License v2
90 +
91 +EAPI="7"
92 +
93 +inherit readme.gentoo-r1 user
94 +
95 +DESCRIPTION="This is the command-line version of the Steam client for dedicated servers"
96 +HOMEPAGE="https://developer.valvesoftware.com/wiki/SteamCMD"
97 +SRC_URI="https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -> ${P}.tar.gz"
98 +
99 +LICENSE="LGPL-2.1+ Steam"
100 +SLOT="0"
101 +KEYWORDS="-* ~amd64 ~x86"
102 +
103 +RDEPEND="app-misc/screen"
104 +
105 +RESTRICT="bindist mirror"
106 +
107 +S="${WORKDIR}"
108 +
109 +QA_PREBUILT="opt/steamcmd/linux32/libstdc++.so.6
110 + opt/steamcmd/linux32/steamcmd"
111 +
112 +pkg_setup() {
113 + enewgroup steamcmd
114 + enewuser steamcmd -1 -1 /opt/steamcmd steamcmd
115 +}
116 +
117 +src_install() {
118 + diropts -o steamcmd -g steamcmd
119 + dodir /opt/steamcmd
120 + keepdir /opt/steamcmd/{.steam,.steam/sdk32,linux32}
121 +
122 + exeopts -o steamcmd -g steamcmd
123 + exeinto /opt/steamcmd
124 + doexe steamcmd.sh
125 +
126 + exeopts -o steamcmd -g steamcmd
127 + exeinto /opt/steamcmd/linux32
128 + doexe linux32/steamcmd linux32/libstdc++.so.6
129 +
130 + newinitd "${FILESDIR}"/steamcmd.initd-r1 steamcmd
131 + newconfd "${FILESDIR}"/steamcmd.confd-r1 steamcmd
132 +
133 + readme.gentoo_create_doc
134 +}
135 +
136 +pkg_postinst() {
137 + readme.gentoo_print_elog
138 +}