summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhruva Sambrani2024-05-03 23:19:42 +0200
committerDhruva Sambrani2024-05-03 23:19:42 +0200
commit4a6d3b703287025ff0154b5f7c7e68dce36908c6 (patch)
tree5f5d7b84807988482505940a009a97eb5b6af187
downloadaur-4a6d3b703287025ff0154b5f7c7e68dce36908c6.tar.gz
First commit
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD20
-rwxr-xr-xheroic-games-launcher-bin-wayland6
-rw-r--r--heroic-games-launcher-bin-wayland-hook.install6
-rw-r--r--heroic-games-launcher-bin-wayland.hook17
6 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..06888ef25ea8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = heroic-games-launcher-bin-wayland-hook
+ pkgdesc = Pacman hook to change heroic-games-launcher-bin to start with ozone-platform-hint=auto after install or upgrade.
+ pkgver = 1
+ pkgrel = 1
+ install = heroic-games-launcher-bin-wayland-hook.install
+ arch = any
+ license = MIT
+ depends = heroic-games-launcher-bin
+ source = heroic-games-launcher-bin-wayland.hook
+ source = heroic-games-launcher-bin-wayland
+ sha1sums = 78bc217a87bb5de50d72b6344e5ac436c73a87e8
+ sha1sums = ade5124066a11b3444f4b09101fc9ad22edfeeb5
+
+pkgname = heroic-games-launcher-bin-wayland-hook
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0ccc4ad98b39
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg
+src
+*pkg*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c71f98d3e15d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,20 @@
+# Maintainer: Emanuel Serpa <emanuelvserpa@gmail.com>
+
+pkgname=heroic-games-launcher-bin-wayland-hook
+pkgver=1
+pkgrel=1
+pkgdesc="Pacman hook to change heroic-games-launcher-bin to start with ozone-platform-hint=auto after install or upgrade."
+arch=("any")
+install=heroic-games-launcher-bin-wayland-hook.install
+license=("MIT")
+depends=('heroic-games-launcher-bin')
+source=(heroic-games-launcher-bin-wayland.hook heroic-games-launcher-bin-wayland)
+sha1sums=('78bc217a87bb5de50d72b6344e5ac436c73a87e8'
+ 'ade5124066a11b3444f4b09101fc9ad22edfeeb5')
+
+package() {
+ install -m755 -d "${pkgdir}/usr/share/libalpm/hooks"
+ install -m644 "${srcdir}/heroic-games-launcher-bin-wayland.hook" "${pkgdir}/usr/share/libalpm/hooks/heroic-games-launcher-bin-wayland.hook"
+ install -m755 -d "${pkgdir}/usr/share/libalpm/scripts"
+ install -m755 "${srcdir}/heroic-games-launcher-bin-wayland" "${pkgdir}/usr/share/libalpm/scripts/heroic-games-launcher-bin-wayland"
+}
diff --git a/heroic-games-launcher-bin-wayland b/heroic-games-launcher-bin-wayland
new file mode 100755
index 000000000000..687795da4e35
--- /dev/null
+++ b/heroic-games-launcher-bin-wayland
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+rm /usr/bin/heroic
+echo -e "#! /bin/bash\n\n/opt/Heroic/heroic --ozone-platform-hint=auto" > /usr/bin/heroic
+chmod +x /usr/bin/heroic
+
diff --git a/heroic-games-launcher-bin-wayland-hook.install b/heroic-games-launcher-bin-wayland-hook.install
new file mode 100644
index 000000000000..dc2af75c6228
--- /dev/null
+++ b/heroic-games-launcher-bin-wayland-hook.install
@@ -0,0 +1,6 @@
+post_install() {
+ echo "Defaulting to Wayland in the current heroic-games-launcher-bin install"
+ rm /usr/bin/heroic
+ echo -e "#! /bin/bash\n\n/opt/Heroic/heroic --ozone-platform-hint=auto" > /usr/bin/heroic
+ chmod +x /usr/bin/heroic
+}
diff --git a/heroic-games-launcher-bin-wayland.hook b/heroic-games-launcher-bin-wayland.hook
new file mode 100644
index 000000000000..b4c2285b0e93
--- /dev/null
+++ b/heroic-games-launcher-bin-wayland.hook
@@ -0,0 +1,17 @@
+[Trigger]
+Type = Package
+Operation = Install
+Operation = Upgrade
+Target = heroic-games-launcher-bin
+
+[Trigger]
+Type = Package
+Operation = Install
+Operation = Upgrade
+Target = heroic-games-launcher-bin-wayland-hook
+
+
+[Action]
+Description = Defaulting to Wayland support for heroic-games-launcher-bin
+When = PostTransaction
+Exec = /usr/share/libalpm/scripts/heroic-games-launcher-bin-wayland