games-util/curseforge: fix ebuild

Signed-off-by: Vincent Ahluwalia <vincentahluwalia@protonmail.com>

Modified ebuild to fetch -deb package instead of AppImage. Fixed some errors.
This commit is contained in:
Vincent Ahluwalia
2025-01-27 13:16:26 +01:00
parent e933540939
commit 521fb3258d
3 changed files with 36 additions and 27 deletions

View File

@@ -1 +1 @@
DIST curseforge-latest-linux.zip 126277535 BLAKE2B 6b2c42aee8d497edc81017be245f7716d26dd4fad972f0bc77796231ea343198f2e03864094e0c32ca6fb5020cc96c3059bcd6b4090d39a0a3ff0554e67df098 SHA512 261664bb2b2790625fab911fa119cbe5a7e33de5efe3bc0fcf82849a77be98730fb2cc90ac5e47b385ef34ea8c7d08060151938ca5d15186f88ef6f09fcf0be5
DIST curseforge-latest-linux.deb 89233064 BLAKE2B 73b8a6909069daca391b05ee95aa125238b99d5672320c6d2039aee77ed1da84e1815967cb4978aea73635d8b8811c37a69a08cfdf11035f21f8afb8072699c0 SHA512 3d905be47c5d9a54d5a934f60166c6974a2ec562877f77e2e4f4885473a594b386ca8e7b6cb85f2d48d86debfa3e12bafbed0d1fa6e0e594d2581ec940991f3a

View File

@@ -3,47 +3,58 @@
EAPI=8
inherit desktop
CHROMIUM_LANGS="
af am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr gu he hi
hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv
sw ta te th tr uk ur vi zh-CN zh-TW
"
inherit chromium-2 desktop unpacker
DESCRIPTION="The CurseForge Electron App"
HOMEPAGE="https://www.curseforge.com/"
SRC_URI="https://curseforge.overwolf.com/downloads/curseforge-latest-linux.zip"
S="${WORKDIR}/build"
SRC_URI="https://curseforge.overwolf.com/downloads/curseforge-latest-linux.deb"
S="${WORKDIR}/"
LICENSE="Overwolf MIT Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="bindist mirror strip test"
RDEPEND="
sys-fs/fuse:0
"
DEPEND=${RDEPEND}
BDEPEND="
app-arch/unzip
"
DESTDIR="/opt/${PN}"
src_install() {
mv ./CurseForge-*.AppImage CurseForge.AppImage
chmod +x CurseForge.AppImage
./CurseForge.AppImage --appimage-extract >/dev/null
sed -i 's/Exec=.*/Exec=\/usr\/bin\/curseforge %U/' squashfs-root/curseforge.desktop
src_configure() {
default
chromium_suid_sandbox_check_kernel_config
}
doicon -s 256 squashfs-root/curseforge.png
domenu squashfs-root/curseforge.desktop
src_install() {
sed -i 's/Exec=.*/Exec=\/usr\/bin\/curseforge %U/' \
"usr/share/applications/curseforge.desktop" \
|| die "Failed correcting .desktop file"
doicon -s 256 "usr/share/icons/hicolor/256x256/apps/curseforge.png"
domenu "usr/share/applications/curseforge.desktop"
exeinto "${DESTDIR}"
doexe CurseForge.AppImage "${FILESDIR}/curseforge"
cd opt/CurseForge/ || die "Failed changing directory to unpacked source"
doexe curseforge chrome-sandbox libEGL.so libGLESv2.so libffmpeg.so libvk_swiftshader.so libvulkan.so.1
insinto "${DESTDIR}"
doins chrome_100_percent.pak chrome_200_percent.pak icudtl.dat resources.pak snapshot_blob.bin v8_context_snapshot.bin
insopts -m0755
doins -r locales resources
fowners root "${DESTDIR}/chrome-sandbox"
fperms 4711 "${DESTDIR}/chrome-sandbox"
[[ -x chrome_crashpad_handler ]] && doins chrome_crashpad_handler
dosym "${DESTDIR}/curseforge" "/usr/bin/curseforge"
}
pkg_postinst() {
elog "This package is an AppImage that will keep itself up-to-date."
elog "Older versions cannot be saved since only the latest version"
elog "is available upstream. Fuse is required as of Version 1.269.2-22204"
elog "because the AppImage is the only way to start the App. May change in"
elog "the future. CurseForge is not open-source."
elog "This package will keep itself up-to-date."
elog "No need to download any ebuilds in the future."
elog "CurseForge is not open-source."
}

View File

@@ -1,2 +0,0 @@
#!/bin/sh
exec /opt/curseforge/CurseForge.AppImage "$@"