# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit desktop DESCRIPTION="PvP modpack for all modern versions of Minecraft" HOMEPAGE="https://lunarclient.com" MY_PN="Lunar Client" SRC_URI="https://launcherupdates.lunarclientcdn.com/${MY_PN// /%20}-${PV}-ow.AppImage -> ${P}.AppImage" S="${WORKDIR}" LICENSE="all-rights-reserved" SLOT="0" KEYWORDS="~amd64" RESTRICT="strip mirror bindist" QA_PREBUILT="opt/${PN}/${PN}.AppImage" RDEPEND=" sys-fs/fuse:3 x11-apps/xrandr " src_unpack() { cp "${DISTDIR}/${P}.AppImage" "${WORKDIR}/${P}.AppImage" || die chmod +x "${WORKDIR}/${P}.AppImage" || die } src_prepare() { default ./"${P}.AppImage" --appimage-extract || die sed -i -E \ "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${PN}|" \ "squashfs-root/lunarclient.desktop" || die chmod -R a-x+rX squashfs-root/usr || die } src_install() { insinto "/opt/${PN}" doins -r squashfs-root/* fperms 755 "/opt/${PN}/lunarclient" fperms 755 "/opt/${PN}/chrome_crashpad_handler" fperms 4755 "/opt/${PN}/chrome-sandbox" domenu squashfs-root/lunarclient.desktop insinto /usr/share/icons/hicolor/512x512/apps newins "${WORKDIR}/squashfs-root/usr/share/icons/hicolor/1024x1024/apps/lunarclient.png" "lunarclient.png" dosym ../../opt/${PN}/lunarclient /usr/bin/${PN} }