blob: 44230e16e64de67deb171bfd547ad533ebb43f07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Maintainer: italoghost <eduprodive at posteo dot me>
pkgname=heroic-games-launcher-electron-git
_pkgname=HeroicGamesLauncher
pkgver=2.16.0.r0.g733b3f60b
pkgrel=1
pkgdesc="Native GOG, Epic Games and Amazon games launcher for Linux, with the system electron (unsupported)."
arch=(x86_64)
url="https://heroicgameslauncher.com/"
license=(GPL-3.0-only)
depends=(electron)
makedepends=(git pnpm)
provides=(heroic-games-launcher)
conflicts=(heroic-games-launcher)
source=(git+https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher.git)
sha256sums=('SKIP')
pkgver() {
cd $_pkgname
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd $_pkgname
sed -i -e "s/Exec=heroic-run /Exec=heroic /" "flatpak/com.heroicgameslauncher.hgl.desktop"
}
build() {
cd $_pkgname
pnpm install
pnpm run download-helper-binaries
pnpm dist:linux tar.xz --x64 --dir -c.electronDist=/usr/lib/electron/ -c.electronVersion=$(cat /usr/lib/electron/version)
}
package() {
install -d "${pkgdir}/usr/lib/heroic"
install -d "${pkgdir}/usr/bin"
# removing arm64 binaries
rm -rf ./$_pkgname/dist/linux-unpacked/resources/app.asar.unpacked/build/bin/arm64/
# copying libs
cp -R ./$_pkgname/dist/linux-unpacked/. "${pkgdir}/usr/lib/heroic/"
# executable
ln -s ${pkgdir}/usr/lib/heroic/heroic "${pkgdir}/usr/bin/heroic"
# icon
install -Dm644 ./$_pkgname/flatpak/com.heroicgameslauncher.hgl.png -t "${pkgdir}/usr/share/pixmaps"
# metainfo
install -Dm644 ./$_pkgname/flatpak/templates/com.heroicgameslauncher.hgl.metainfo.xml.template "${pkgdir}"/usr/share/metainfo/com.heroicgameslauncher.hgl.metainfo.xml
# desktop file
install -Dm644 ./$_pkgname/flatpak/com.heroicgameslauncher.hgl.desktop -t "${pkgdir}/usr/share/applications"
}
|