1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit dotnet-pkg-base systemd
11 DESCRIPTION="Dedicated game server for Vintage Story"
12 HOMEPAGE="https://www.vintagestory.at/"
13 SRC_URI="https://cdn.vintagestory.at/gamefiles/${_CHANNEL}/vs_server_linux-x64_${MY_PV}.tar.gz"
16 LICENSE="all-rights-reserved"
21 acct-group/vintagestory
22 acct-user/vintagestory
25 virtual/dotnet-sdk:${DOTNET_PKG_COMPAT}
28 virtual/dotnet-sdk:${DOTNET_PKG_COMPAT}
32 RESTRICT="bindist mirror strip"
37 DOTNET_PKG_OUTPUT="${S}"
38 INST_DIR="/opt/${PN}-${PV}"
41 rm "${S}/server.sh" || die
43 envsubst < "${FILESDIR}/vintagestory-server.service" > "${S}/vintagestory-server-${PV}@.service" || die
44 envsubst < "${FILESDIR}/vintagestory-server.initd" > "${S}/vintagestory-server-${PV}.initd" || die
54 dotnet-pkg-base_install "${INST_DIR}"
55 dotnet-pkg-base_dolauncher "${INST_DIR}/VintagestoryServer" "${P}"
57 newinitd "${S}/vintagestory-server-${PV}.initd" "vintagestory-server-${PV}"
58 newconfd "${FILESDIR}"/vintagestory-server.confd "vintagestory-server-${PV}"
59 systemd_dounit "${S}/vintagestory-server-${PV}@.service"