summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authoreroen <eroen-overlay@occam.eroen.eu>2016-09-18 18:02:51 +0200
committereroen <eroen-overlay@occam.eroen.eu>2016-09-18 18:02:51 +0200
commite27a3dcc848c1b15096ff8423d5b1088757f7954 (patch)
treed13992fc253f748d7ebb1189e3e4076f3c7eee4e /eclass
parentopenmw-0.40.0 is released (diff)
downloaderoen-e27a3dcc848c1b15096ff8423d5b1088757f7954.tar.gz
eroen-e27a3dcc848c1b15096ff8423d5b1088757f7954.tar.bz2
eroen-e27a3dcc848c1b15096ff8423d5b1088757f7954.zip
steam.eclass - move steamcli to separate package
Diffstat (limited to 'eclass')
-rw-r--r--eclass/steam.eclass24
1 files changed, 14 insertions, 10 deletions
diff --git a/eclass/steam.eclass b/eclass/steam.eclass
index eb5ceae..e426774 100644
--- a/eclass/steam.eclass
+++ b/eclass/steam.eclass
@@ -32,11 +32,8 @@ inherit linux-info python-any-r1
EXPORT_FUNCTIONS pkg_setup src_unpack
-SRC_URI="https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz"
-
DEPEND="${PYTHON_DEPS}
- sys-devel/gcc[cxx]
- amd64? ( sys-devel/gcc[cxx,multilib] )"
+ net-misc/steamcmd-bin"
# @ECLASS-VARIABLE: STEAM_app_id
# @DEFAULT_UNSET
@@ -85,6 +82,12 @@ DEPEND="${PYTHON_DEPS}
# Directory where the eclass expects to find its internal files.
STEAM_FILESDIR="${BASH_SOURCE[0]%/*}/files"
+# @ECLASS-VARIABLE: STEAM_STEAMCMD
+# @INTERNAL
+# @DESCRIPTION:
+# Absolute path to steamcmd.sh
+STEAM_STEAMCMD=$T/steamcmd/steamcmd.sh
+
# @FUNCTION: steam_pkg_setup
# @DESCRIPTION:
# This function is exported. It makes sanity checks and fails early for some
@@ -95,7 +98,7 @@ steam_pkg_setup() {
if linux_config_exists; then
if [[ -n $(linux_chkconfig_string PAX_ELFRELOCS) ]] && \
! linux_chkconfig_present PAX_ELFRELOCS; then
- die "Need support for x86 TEXTRELs"
+ die "steamcmd needs support for x86 TEXTRELs to run"
fi
else
ewarn "Could not find kernel config. The install will fail later if"
@@ -141,7 +144,7 @@ steam_get_mail() {
esteamcmd() {
# Supply password on stdin to avoid leaking it in /proc/$pid/cmdline
printf "%s\n" "$(steam_get_cred STEAM_PASS)" \
- | ./steamcmd.sh \
+ | "$STEAM_STEAMCMD" \
"+@ShutdownOnFailedCommand 1" \
"+@NoPromptForPassword 0" \
"+login $(steam_get_cred STEAM_USER)" \
@@ -157,19 +160,19 @@ esteamcmd() {
steam_firstlogin() {
# make steam up to date
einfo "Update steam"
- ./steamcmd.sh "+quit" || die "unable to run steamcmd.sh"
+ "$STEAM_STEAMCMD" "+quit" || die "unable to run steamcmd.sh"
# generate the 'special access code'
einfo "Attempt to log in, generate special access code email"
printf "%s\n" "$(steam_get_cred STEAM_PASS)" \
- | ./steamcmd.sh "+login $(steam_get_cred STEAM_USER)" "+quit"
+ | "$STEAM_STEAMCMD" "+login $(steam_get_cred STEAM_USER)" "+quit"
if [[ $? == 5 ]]; then
local i imax=5
for (( i=1; i<=imax; i++ )); do
# supply 'special access code'
einfo "Supply special access code, attempt $i of $imax"
printf "%s\n" "$(steam_get_cred STEAM_PASS)" \
- | ./steamcmd.sh "+set_steam_guard_code $(steam_get_mail)" \
+ | "$STEAM_STEAMCMD" "+set_steam_guard_code $(steam_get_mail)" \
"+login $(steam_get_cred STEAM_USER)" \
"+quit" && break
@@ -195,7 +198,8 @@ steam_src_unpack() {
die "\$STEAM_app_id is not set, $FUNCNAME cannot be used"
fi
- default
+ cp -rf "$EROOT/opt/steamcmd" "${STEAM_STEAMCMD%/*}" || die
+
steam_firstlogin
local cmd_platform=