# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Thanks to AUR maintainer copygirl for their PKGBUILD, which this # is based on. EAPI=8 DOTNET_PKG_COMPAT="7.0" inherit desktop font xdg-utils dotnet-pkg-base DESCRIPTION="Uncompromising wilderness survival sandbox game" HOMEPAGE="https://www.vintagestory.at/" AUR_COMMIT="e0ccb81a7f7bf6ef9a966aa54ffd8df5765143c2" RDEPEND=" ${DOTNET_PKG_RDEPS} virtual/opengl " SRC_URI="https://cdn.vintagestory.at/gamefiles/stable/vs_client_linux_x64_${PV}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/${PN}" FONT_S="${WORKDIR}/${PN}/assets/game/fonts" FONT_SUFFIX="otf ttf" LICENSE="all-rights-reserved" SLOT="0" KEYWORDS="~amd64" QA_PREBUILT="usr/share/${PN}/*" RESTRICT="bindist mirror" src_install() { # remove install script provided by developers rm install.sh # create symbolic links for any assets (excluding fonts) containging non-lowercase letters. # some asset files might include uppercase letters, but the game expects them to be lowercase find assets/ -not -path "*/fonts/*" -regex ".*/.*[A-Z].*" | while read -r file; do local filename="$(basename -- "$file")" ln -sf "$filename" "${file%/*}"/"${filename,,}" done # install fonts font_src_install # install desktop files and icon domenu "${FILESDIR}"/*.desktop newicon assets/gameicon.xpm ${PN}.xpm # install all application files cp -rdp --no-preserve=ownership . "${ED}"/usr/share/"${PN}" # create a wrapper to set up the .NET runtime dotnet-pkg-base_dolauncher "${EPREFIX}"/usr/share/"${PN}"/Vintagestory "${PN}" } pkg_postinst() { xdg_desktop_database_update } pkg_postrm() { xdg_desktop_database_update }