summaryrefslogtreecommitdiff
blob: 0d2067a3069221bda5276250ab02e4c85f5a154f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
}