upgpkg: discord 0.0.55-2: refactor, fix autostart, add deps, use wayland

* Slightly refactor PKGBUILD
* Fix autostart desktop file
* Add optional dependency used in official arch package
* Include patcher to allow Krisp noise suppression support
* Add install file to inform user about this change
* Use Wayland instead of Xwayland in a Wayland session by setting
  Electron flag `ozone-platform-hint` to auto (default is X11)
This commit is contained in:
Manuel 2024-06-09 21:58:06 +02:00
parent 3cb800694b
commit 9fafba484a
Signed by: Manuel
GPG key ID: 4085037435E1F07A
6 changed files with 252 additions and 47 deletions

View file

@ -0,0 +1,19 @@
post_upgrade() {
# return if old package version is greater than or equal to 0.0.55-2...
(( $(vercmp $2 '0.0.55-2') >= 0 )) && return
cat <<EOF
==> In order to patch Krisp noise suppression support set 'PATCH_KRISP=true'
in '~/.config/discord.conf' and install the necessary optional dependencies.
EOF
}
post_install() {
cat <<EOF
==> For Krisp noise suppression support consider installing the necessary optional
dependencies and setting 'PATCH_KRISP=true' in '~/.config/discord.conf'.
Restart your Discord client afterwards to apply the patch.
==> In case of performance problems consider setting additional flags
in '~/.config/discord-flags.conf'.
EOF
}