# Maintainer: Christian Schendel # Contributor: Fabio 'Lolix' Loli -> https://github.com/FabioLolix pkgname=heroic-games-launcher pkgver=2.18.1 pkgrel=1 pkgdesc="Native GOG, Epic Games and Amazon games launcher for Linux" arch=( x86_64 ) url="https://heroicgameslauncher.com/" license=( GPL-3.0-only ) _electron=electron36 depends=( bash gcc-libs glibc $_electron which zlib ) makedepends=( desktop-file-utils git nodejs-lts-jod npm pnpm python ) source=("git+https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher.git#tag=v${pkgver}") b2sums=('56551e7ee595d78779ad55a1d7de483bafe60b07621530501e80393dc1f3832cb6f37e15b8a8089c5467914773c5b4feef90302632f411365aa6a19f218a8450') build() { cd HeroicGamesLauncher HOME="${srcdir}/.electron-gyp" pnpm install pnpm run download-helper-binaries ./node_modules/.bin/electron-vite build ./node_modules/.bin/electron-builder --linux --x64 --dir -c.electronDist=/usr/lib/${_electron}/ -c.electronVersion="$(cat /usr/lib/${_electron}/version)" } package() { cd "HeroicGamesLauncher" install -d "${pkgdir}/usr/lib/heroic" cp -rf dist/linux-unpacked/resources/app.asar{,.unpacked} "${pkgdir}/usr/lib/heroic/" rm -rf "${pkgdir}/usr/lib/heroic/app.asar.unpacked/build/bin/x64/win32" rm -rf "${pkgdir}/usr/lib/heroic/app.asar.unpacked/build/bin/arm64" install -Dm755 /dev/stdin "${pkgdir}/usr/bin/heroic" <