forked from FemboyOS/fempkg_recipes
feat: add heroic games launcher
This commit is contained in:
35
heroic-games-launcher.recipe.py
Normal file
35
heroic-games-launcher.recipe.py
Normal file
@@ -0,0 +1,35 @@
|
||||
pkgname = "heroic-games-launcher"
|
||||
pkgver = "2.18.1"
|
||||
source = f"https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/archive/refs/tags/v{pkgver}.tar.gz"
|
||||
builddir = f"/tmp/fempkg/build/{pkgname}/HeroicGamesLauncher-{pkgver}"
|
||||
fembuilddir = f"/tmp/fempkg/build/{pkgname}"
|
||||
outputdir = "/home/gabry/lfs-repo/binpkg"
|
||||
manifestdir = "/home/gabry/lfs-repo/manifests"
|
||||
destdir = f"{fembuilddir}/DESTDIR"
|
||||
|
||||
deps = ["electron", "pnpm", "nodejs"]
|
||||
|
||||
build = [
|
||||
# Extract
|
||||
f"mkdir -p {fembuilddir} && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/v{pkgver}.tar.gz",
|
||||
|
||||
# 64-bit build
|
||||
f"cd {builddir} && pnpm install",
|
||||
f"cd {builddir} && pnpm dist:linux tar.xz",
|
||||
f"cd {builddir} && mkdir -p {destdir}/usr/lib/{pkgname} {destdir}/usr/bin && mv dist/linux-unpacked/* {destdir}/usr/lib/{pkgname} && "
|
||||
f"ln -sf /usr/lib/{pkgname}/heroic {destdir}/usr/bin/heroic",
|
||||
|
||||
f"desktop-file-edit {builddir}/flatpak/com.heroicgameslauncher.hgl.desktop --set-key=Exec \"--set-value=heroic %u\"",
|
||||
f"mkdir -p {destdir}/usr/share/applications && install -v -m644 {builddir}/flatpak/com.heroicgameslauncher.hgl.desktop {destdir}"
|
||||
f"/usr/share/applications/com.heroicgameslauncher.hgl.desktop",
|
||||
|
||||
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
||||
f"install -v -m644 {builddir}/COPYING {destdir}/usr/share/licenses/{pkgname}/LICENSE",
|
||||
|
||||
# Make tarball + manifests
|
||||
f"mkdir -p {outputdir} && cd {destdir} && tar --transform 's|^\\.||' -I zstd -cf {outputdir}/{pkgname}-{pkgver}.tar.zst .",
|
||||
f"mkdir -p {manifestdir} && tar -tf {outputdir}/{pkgname}-{pkgver}.tar.zst | grep -v '/$' > {manifestdir}/{pkgname}.txt",
|
||||
|
||||
# Cleanup
|
||||
f"rm -rf {fembuilddir}"
|
||||
]
|
||||
Reference in New Issue
Block a user