summaryrefslogtreecommitdiff
blob: 4127418ae027b80584499e93f4d1433707097d1f (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

DESCRIPTION="dedicated server for GTA3 multiplayer"
HOMEPAGE="http://mtavc.com/"
SRC_URI="http://files.gonnaplay.com/201/MTAServer0_5-linux.tar.gz"

LICENSE="MTA-0.5"
SLOT="0"
KEYWORDS="-* ~x86"
IUSE=""

RDEPEND="sys-libs/libstdc++-v3:5"
DEPEND=""

S=${WORKDIR}

QA_PREBUILT="/opt/${PN}/MTAServer"
QA_EXECSTACK="/opt/${PN}/MTAServer"

src_prepare() {
	default

	sed -i 's:NoName:Gentoo:' mtaserver.conf || die
}

src_install() {
	local dir=/opt/${PN}
	local files="banned.lst motd.txt mtaserver.conf"
	local f

	dobin "${FILESDIR}"/mtavc
	sed -i -e "s:GENTOO_DIR:${dir}:" "${D}/usr/bin"/mtavc

	exeinto "${dir}"
	newexe MTAServer${PV} MTAServer
	insinto /etc/${PN}
	doins ${files}
	dodoc README CHANGELOG
	for f in ${files} ; do
		dosym ../../etc/${PN}/${f} "${dir}"/${f}
	done
}