upgpkg: discord-electron 0.0.27-2
Update Discord launcher script (Original by Zoddo) Add libxss as dependency to fix Discord corruption warning Add install script to notify user about discord-flags.conf Remove duplicate Path variable in .desktop file Update contributor list
This commit is contained in:
parent
c21344130c
commit
b09bd231d5
4 changed files with 63 additions and 36 deletions
|
@ -1,4 +1,6 @@
|
|||
# Maintainer: Manuel Hüsers <aur@huesers.de>
|
||||
# Contributor: Zoddo <archlinux+aur@zoddo.fr>
|
||||
# Contributor: Thaodan <AUR+me@thaodan.de>
|
||||
# Contributor: Stick <stick@stma.is>
|
||||
# Contributor: johnnyapol <arch@johnnyapol.me>
|
||||
# Contributor: huyizheng <huyizheng@hotmail.com>
|
||||
|
@ -6,14 +8,14 @@
|
|||
# Contributor: Morgan <morganamilo@archlinux.org>
|
||||
|
||||
# Based off the discord_arch_electron_wayland PKGBUILD from Stick
|
||||
# Based off the discord_arch_electron PKGBUILD from johnnyapol and huyizheng
|
||||
# Based off the discord_arch_electron PKGBUILD from johnnyapol, huyizheng, Thaodan and Zoddo
|
||||
# Based off the discord community repo PKGBUILD by Filipe Laíns (FFY00)
|
||||
|
||||
pkgname=discord-electron
|
||||
_pkgname=discord
|
||||
_electron=22
|
||||
pkgver=0.0.27
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Discord using system provided electron (v${_electron}) for increased security and performance"
|
||||
arch=('x86_64')
|
||||
provides=("${_pkgname}")
|
||||
|
@ -21,49 +23,24 @@ conflicts=("${_pkgname}")
|
|||
url='https://discord.com'
|
||||
license=('custom')
|
||||
options=('!strip')
|
||||
depends=("electron${_electron}")
|
||||
install="$pkgname.install"
|
||||
depends=("electron${_electron}" 'libxss')
|
||||
makedepends=('asar' 'curl' 'python-html2text')
|
||||
optdepends=(
|
||||
'libpulse: Pulseaudio support'
|
||||
'xdg-utils: Open files'
|
||||
)
|
||||
source=("https://dl.discordapp.net/apps/linux/${pkgver}/discord-${pkgver}.tar.gz")
|
||||
sha512sums=('285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f')
|
||||
source=("https://dl.discordapp.net/apps/linux/${pkgver}/discord-${pkgver}.tar.gz"
|
||||
'discord-launcher.sh')
|
||||
sha512sums=('285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f'
|
||||
'd8c531d23014611b1e9dfa2d268747ba601f647c2cbfc26c15c9eebcec6f9feb454d10c6f603b9938e8da568da3080372b14309e966e0d00c0e1284a14591a83')
|
||||
|
||||
prepare() {
|
||||
# create launcher script
|
||||
cat >> "${srcdir}"/discord-launcher.sh <<EOF
|
||||
#!/bin/sh
|
||||
|
||||
if [ "\$XDG_SESSION_TYPE" = wayland ]; then
|
||||
# Using wayland
|
||||
exec electron${_electron} \\
|
||||
--enable-features=UseOzonePlatform \\
|
||||
--ozone-platform=wayland \\
|
||||
--enable-accelerated-mjpeg-decode \\
|
||||
--enable-accelerated-video \\
|
||||
--ignore-gpu-blacklist \\
|
||||
--enable-native-gpu-memory-buffers \\
|
||||
--enable-gpu-rasterization \\
|
||||
--enable-gpu \\
|
||||
--enable-features=WebRTCPipeWireCapturer \\
|
||||
/usr/lib/discord/app.asar \$@
|
||||
else
|
||||
# Using x11
|
||||
exec electron${_electron} \\
|
||||
--enable-accelerated-mjpeg-decode \\
|
||||
--enable-accelerated-video \\
|
||||
--ignore-gpu-blacklist \\
|
||||
--enable-native-gpu-memory-buffers \\
|
||||
--enable-gpu-rasterization \\
|
||||
--enable-gpu \\
|
||||
/usr/lib/discord/app.asar \$@
|
||||
fi
|
||||
EOF
|
||||
# prepare launcher and install script
|
||||
sed -i "s|@PKGNAME@|${_pkgname}|;s|@ELECTRON@|${_electron}|" discord-launcher.sh
|
||||
|
||||
# fix the .desktop file
|
||||
sed -i "s|Exec=.*|Exec=/usr/bin/${_pkgname}|" Discord/$_pkgname.desktop
|
||||
echo 'Path=/usr/bin' >> Discord/$_pkgname.desktop
|
||||
|
||||
# create the license files
|
||||
curl https://discord.com/terms | html2text >"${srcdir}"/LICENSE.md
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue