0.0.10-5: support electron9

This commit is contained in:
John C. Allwein 2020-05-30 12:10:13 -04:00
parent 86c8012415
commit 9b29b0b9df
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 50982AE5B444BE15
2 changed files with 13 additions and 7 deletions

View file

@ -1,7 +1,7 @@
pkgbase = discord_arch_electron
pkgdesc = All-in-one voice and text chat for gamers that's free and secure.
pkgver = 0.0.10
pkgrel = 4
pkgrel = 5
url = https://discordapp.com
arch = x86_64
license = custom
@ -9,6 +9,7 @@ pkgbase = discord_arch_electron
optdepends = libpulse: Pulseaudio support
optdepends = xdg-utils: Open files
provides = discord
conflicts = discord
source = https://dl.discordapp.net/apps/linux/0.0.10/discord-0.0.10.tar.gz
source = LICENSE.html::https://discordapp.com/terms
source = OSS-LICENSES.html::https://discordapp.com/licenses

View file

@ -3,10 +3,11 @@
pkgname=discord_arch_electron
_pkgname=discord
pkgver=0.0.10
pkgrel=4
pkgrel=5
pkgdesc="All-in-one voice and text chat for gamers that's free and secure."
arch=('x86_64')
provides=('discord')
conflicts=('discord')
url='https://discordapp.com'
license=('custom')
depends=('electron')
@ -24,9 +25,6 @@ prepare() {
sed -i "s|Exec=.*|Exec=/usr/bin/$_pkgname|" $_pkgname.desktop
echo 'Path=/usr/bin' >> $_pkgname.desktop
# We need to hack in our custom app.asar path, otherwise electron will complain
sed -i "s|_path2.default.join(process.resourcesPath, 'build_info.json')|'/opt/$_pkgname/resources/build_info.json' |" resources/app.asar
}
package() {
@ -46,9 +44,16 @@ package() {
chmod 755 "$pkgdir"/opt/$_pkgname/$_pkgname
install -d "$pkgdir"/usr/{bin,share/{pixmaps,applications}}
install -d "$pkgdir"/usr/lib/electron
install -d "$pkgdir"/usr/lib/electron/resources
ln -s /opt/$_pkgname/$_pkgname "$pkgdir"/usr/bin/$_pkgname
ln -s /opt/$_pkgname/discord.png "$pkgdir"/usr/share/pixmaps/$_pkgname.png
ln -s /opt/$_pkgname/$_pkgname.desktop "$pkgdir"/usr/share/applications/$_pkgname.desktop
ln -sf /opt/$_pkgname/discord.png "$pkgdir"/usr/share/pixmaps/$_pkgname.png
ln -sf /opt/$_pkgname/$_pkgname.desktop "$pkgdir"/usr/share/applications/$_pkgname.desktop
# HACKS FOR SYSTEM ELECTRON
ln -s /opt/$_pkgname/resources/build_info.json "$pkgdir"/usr/lib/electron/resources/
ln -s /opt/$_pkgname/discord.png "$pkgdir"/usr/lib/electron
# Licenses
install -Dm 644 LICENSE.html "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.html