# Copyright 2024-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit desktop xdg _PN="${PN%-bin}" _PS="tachyon" DESCRIPTION="A free-to-win rhythm game. Rhythm is just a click away!" HOMEPAGE="https://osu.ppy.sh/ https://github.com/ppy/osu" case $_PS in "lazer") SRC_URI="https://github.com/ppy/osu/releases/download/${PV}/osu.AppImage -> ${_PN}-${PV}.AppImage" ;; "tachyon") SRC_URI="https://github.com/ppy/osu/releases/download/${PV}-tachyon/osu.AppImage -> ${_PN}-${PV}.AppImage" ;; esac SRC_URI+=" https://github.com/ppy/osu/raw/refs/heads/master/LICENCE -> ${_PN}-LICENCE https://github.com/ppy/osu-resources/raw/refs/heads/master/LICENCE.md -> ${_PN}-resources-LICENCE.md " S="${WORKDIR}" LICENSE="MIT CC-BY-NC-4.0" SLOT="0/${_PS}" KEYWORDS="-* ~amd64" IUSE="complete-icon pipewire sdl2 +system-sdl" RESTRICT="mirror" DEPEND=" !games-arcade/osu-lazer x11-themes/hicolor-icon-theme " RDEPEND=" ${DEPEND} dev-util/lttng-ust:0/2.12 system-sdl? ( sdl2? ( "${_PN}" } src_install() { # Install game files insinto "/usr/lib/${_PN}" doins -r squashfs-root/usr/bin/* fperms +x "/usr/lib/${_PN}/osu!" # Install wrapper script dobin "${_PN}" # Install desktop file domenu "${FILESDIR}/${_PN}.desktop" # Install mime file insinto /usr/share/mime/packages doins "${FILESDIR}/${_PN}.xml" # Install icons pushd icons for icon in *; do type="${icon%-*}" size="${icon##*-}" case "${type}" in "osu") newicon --context "apps" --size "${size}" "${icon}" "${_PN}.png" ;; "beatmap") newicon --context "mimetypes" --size "${size}" "${icon}" "${_PN%-lazer}-beatmap.png" ;; esac done popd # Install license insinto "/usr/share/licenses/${_PN}" newins "${DISTDIR}/${_PN}-LICENCE" "${_PN}-LICENCE" newins "${DISTDIR}/${_PN}-resources-LICENCE.md" "${_PN}-resources-LICENCE.md" }