diff options
author | Geoffrey Westhoff | 2024-05-04 01:13:15 +0200 |
---|---|---|
committer | Geoffrey Westhoff | 2024-05-04 01:13:15 +0200 |
commit | f13f2da46738ad14b8263a4feb558976b9c83f9d (patch) | |
tree | d023b8fd47a26754b32ad221642550c54d6febeb | |
parent | cb3eef4c9f70e17bead7f9b77db62c72e19cbb6a (diff) | |
download | aur-f13f2da46738ad14b8263a4feb558976b9c83f9d.tar.gz |
fix: modulenotfound during bootstrapping
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | installed.json | 19 |
3 files changed, 44 insertions, 12 deletions
@@ -1,12 +1,12 @@ pkgbase = discord-canary-electron-bin pkgdesc = Discord Canary (popular voice + video app) using the system provided electron for increased security and performance - pkgver = 0.0.358 + pkgver = 0.0.380 pkgrel = 2 url = https://canary.discordapp.com arch = x86_64 license = custom makedepends = asar - depends = electron + depends = electron29 depends = gtk3 depends = libnotify depends = libxss @@ -25,11 +25,13 @@ pkgbase = discord-canary-electron-bin provides = discord-canary conflicts = discord-canary options = !strip - source = https://dl-canary.discordapp.net/apps/linux/0.0.358/discord-canary-0.0.358.tar.gz + source = https://dl-canary.discordapp.net/apps/linux/0.0.380/discord-canary-0.0.380.tar.gz source = LICENSE.html::https://discordapp.com/terms source = OSS-LICENSES.html::https://discordapp.com/licenses - sha256sums = cd88a280623a48133049c81d502e38bf836ff2e6d90360b3aaabdae8d4831509 + source = installed.json + sha256sums = ef1e81c5c6d7002d8abacbeca6fe4909e2178f1da47030eccf3a239a70ec536c sha256sums = SKIP sha256sums = SKIP + sha256sums = 5afdfdcb67493946553cad1255e1084add21392171d8ffb79c0ce76865e71f0a pkgname = discord-canary-electron-bin @@ -16,7 +16,7 @@ pkgname=discord-canary-electron-bin _pkgname=discord-canary -pkgver=0.0.358 +pkgver=0.0.380 pkgrel=2 pkgdesc="Discord Canary (popular voice + video app) using the system provided electron for increased security and performance" arch=('x86_64') @@ -25,7 +25,7 @@ conflicts=('discord-canary') url='https://canary.discordapp.com' license=('custom') options=(!strip) -depends=('electron' 'gtk3' 'libnotify' 'libxss' 'glibc' 'alsa-lib' 'nspr' 'nss' 'xdg-utils' 'libcups' 'unzip') +depends=('electron29' 'gtk3' 'libnotify' 'libxss' 'glibc' 'alsa-lib' 'nspr' 'nss' 'xdg-utils' 'libcups' 'unzip') makedepends=('asar') optdepends=('libpulse: Pulseaudio support' 'xdg-utils: Open files' @@ -34,15 +34,23 @@ optdepends=('libpulse: Pulseaudio support' 'noto-fonts-cjk: Font for special characters such as /shrug face.') source=("https://dl-canary.discordapp.net/apps/linux/${pkgver}/${_pkgname}-${pkgver}.tar.gz" 'LICENSE.html::https://discordapp.com/terms' - 'OSS-LICENSES.html::https://discordapp.com/licenses') + 'OSS-LICENSES.html::https://discordapp.com/licenses' + 'installed.json' + ) # Skip SHA256 of licenses, it fails always for some reason. -sha256sums=('cd88a280623a48133049c81d502e38bf836ff2e6d90360b3aaabdae8d4831509' +sha256sums=('ef1e81c5c6d7002d8abacbeca6fe4909e2178f1da47030eccf3a239a70ec536c' 'SKIP' - 'SKIP') + 'SKIP' + '5afdfdcb67493946553cad1255e1084add21392171d8ffb79c0ce76865e71f0a' + ) + # The tar extracts to a folder called DiscordCanary. _tarname=DiscordCanary +#installed.json needs to be copied to this folder or the updater breaks +_discordmodules='$HOME'/.config/discordcanary/$pkgver/modules/ + prepare() { # Extract the downloaded tar. tar xf ${_pkgname}-${pkgver}.tar.gz @@ -70,14 +78,18 @@ package() { # Copy relevant data cp -r "$_tarname"/resources/* "$pkgdir"/usr/lib/$_pkgname/ + + #Install the file needed to bootstrap the updater + install -Dm 644 installed.json "$pkgdir"/usr/lib/$_pkgname/ # Create starter script for discord echo "#!/bin/sh" > "$srcdir"/$_pkgname - echo "exec electron /usr/lib/$_pkgname/app.asar \$@" >> "$srcdir"/$_pkgname + echo "if ! [ -f $_discordmodules/installed.json ]; then mkdir -p $_discordmodules && cp /usr/lib/$_pkgname/installed.json $_discordmodules; fi" >> "$srcdir/$_pkgname" + echo "exec electron29 /usr/lib/$_pkgname/app.asar \$@" >> "$srcdir"/$_pkgname install -d "$pkgdir"/usr/{bin,share/{pixmaps,applications}} install -Dm 755 $_pkgname "$pkgdir"/usr/bin/$_pkgname - + cp $_tarname/discord.png "$pkgdir"/usr/share/pixmaps/$_pkgname.png cp $_tarname/$_pkgname.desktop "$pkgdir"/usr/share/applications/$_pkgname.desktop @@ -85,4 +97,3 @@ package() { install -Dm 644 LICENSE.html "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.html install -Dm 644 OSS-LICENSES.html "$pkgdir"/usr/share/licenses/$pkgname/OSS-LICENSES.html } - diff --git a/installed.json b/installed.json new file mode 100644 index 000000000000..3ea93832da06 --- /dev/null +++ b/installed.json @@ -0,0 +1,19 @@ +{ + "discord_desktop_core": { + "installedVersion": 0 + }, + "discord_erlpack": { + "installedVersion": 0 }, + "discord_spellcheck": { + "installedVersion": 0 + }, + "discord_utils": { + "installedVersion": 0 + }, + "discord_voice": { + "installedVersion": 0 + }, + "discord_zstd": { + "installedVersion": 0 + } + } |