From e383def50503a73f9736553f025888edbca8f586 Mon Sep 17 00:00:00 2001 From: Wiktor Ciurej Date: Sat, 29 Oct 2022 18:47:44 +0200 Subject: [PATCH] New package: heroic-games-launcher-2.4.3 --- .../files/heroic.desktop | 10 +++++ srcpkgs/heroic-games-launcher/template | 45 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 srcpkgs/heroic-games-launcher/files/heroic.desktop create mode 100644 srcpkgs/heroic-games-launcher/template diff --git a/srcpkgs/heroic-games-launcher/files/heroic.desktop b/srcpkgs/heroic-games-launcher/files/heroic.desktop new file mode 100644 index 000000000000..15c393b9e41e --- /dev/null +++ b/srcpkgs/heroic-games-launcher/files/heroic.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Heroic Games Launcher +Exec=/usr/bin/heroic %U +Terminal=false +Type=Application +Icon=heroic +StartupWMClass=Heroic +Comment=Open Source GOG and Epic Games launcher +MimeType=x-scheme-handler/heroic; +Categories=Game; diff --git a/srcpkgs/heroic-games-launcher/template b/srcpkgs/heroic-games-launcher/template new file mode 100644 index 000000000000..aeddb6f659b8 --- /dev/null +++ b/srcpkgs/heroic-games-launcher/template @@ -0,0 +1,45 @@ +# Template file for 'heroic-games-launcher' +pkgname=heroic-games-launcher +version=2.4.3 +revision=1 +archs="x86_64* armv7l* aarch64*" +wrksrc="HeroicGamesLauncher-${version}" +hostmakedepends="nodejs python3 yarn" +depends="alsa-lib gtk+3 nss python3" +checkdepends="tar xz" +short_desc="Open Source Launcher for GOG and Epic Games" +maintainer="Wiktor Ciurej " +license="GPL-3.0-or-later" +homepage="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher" +distfiles="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/archive/v${version}.tar.gz" +checksum=b6590fd99776c2f6d890266ee177d1d90f8a127eaa47b9aec41fc00c4194bc9a +nopie_files="/opt/heroic/resources/app.asar.unpacked/build/bin/linux/gogdl + /opt/heroic/resources/app.asar.unpacked/build/bin/linux/legendary" + +case ${XBPS_TARGET_MACHINE} in + x86_64*) _arch=x64 ;; + aarch64*) _arch=arm64 ;; + armv7l*) _arch=armv7l ;; + *) broken="There is no electron package provided for selected architecture." ;; +esac + +do_build() { + npm_config_arch=${_arch} npm_config_platform=linux yarn + npm_config_arch=${_arch} npm_config_platform=linux yarn dist:linux tar.xz --${_arch} +} + +do_check() { + npm_config_arch=${_arch} yarn test + npm_config_arch=${_arch} yarn test:ci +} + +do_install() { + vmkdir opt/heroic/ + vcopy dist/linux-unpacked/* opt/heroic/ + vmkdir usr/bin/ + ln -sf /opt/heroic/heroic ${DESTDIR}/usr/bin/heroic + vmkdir usr/share/pixmaps/ + vinstall public/icon.png 0755 usr/share/pixmaps/ heroic.png + vmkdir usr/share/applications/ + vinstall ${FILESDIR}/heroic.desktop 0755 usr/share/applications/ +}