2022-06-08 21:02:54 +02:00
|
|
|
# Maintainer: Zoddo <archlinux+aur@zoddo.fr>
|
2022-10-29 22:13:19 +02:00
|
|
|
# Contributor: Thaodan <AUR+me@thaodan.de>
|
2022-06-08 21:02:54 +02:00
|
|
|
# Contributor: huyizheng
|
|
|
|
# Contributor: johnnyapol <arch@johnnyapol.me>
|
2020-05-20 01:50:18 +02:00
|
|
|
# Based off the discord community repo PKGBUILD by Filipe Laíns (FFY00) <lains@archlinux.org>
|
|
|
|
_pkgname=discord
|
2023-03-31 18:53:17 +02:00
|
|
|
_electron=electron
|
2022-10-29 22:13:19 +02:00
|
|
|
pkgname=${_pkgname}_arch_electron
|
2023-03-31 18:53:17 +02:00
|
|
|
pkgver=0.0.26
|
2022-12-10 12:07:22 +01:00
|
|
|
pkgrel=1
|
2020-08-06 19:54:48 +02:00
|
|
|
pkgdesc="Discord (popular voice + video app) using the system provided electron for increased security and performance"
|
2020-05-20 01:50:18 +02:00
|
|
|
arch=('x86_64')
|
2022-12-10 12:14:58 +01:00
|
|
|
provides=("${_pkgname}")
|
|
|
|
conflicts=("${_pkgname}")
|
2022-06-08 21:02:54 +02:00
|
|
|
url='https://discord.com'
|
2020-05-20 01:50:18 +02:00
|
|
|
license=('custom')
|
2022-11-10 02:02:08 +01:00
|
|
|
options=(!strip)
|
2022-10-29 22:13:19 +02:00
|
|
|
depends=("${_electron}" 'libxss')
|
2020-11-19 15:29:58 +01:00
|
|
|
makedepends=('asar')
|
2020-05-20 01:50:18 +02:00
|
|
|
optdepends=('libpulse: Pulseaudio support'
|
|
|
|
'xdg-utils: Open files')
|
|
|
|
source=("https://dl.discordapp.net/apps/linux/$pkgver/$_pkgname-$pkgver.tar.gz"
|
2022-09-15 19:43:31 +02:00
|
|
|
'discord-launcher.sh'
|
2022-10-29 22:13:19 +02:00
|
|
|
'LICENSE.html::https://discord.com/terms'
|
|
|
|
'OSS-LICENSES.html::https://discord.com/licenses')
|
2023-03-31 18:53:17 +02:00
|
|
|
sha512sums=('65477c2c033f30850a699706a6502ff4f4af8838185716d968d641fdab3033555139b04bf91a111a847aca14113e33ba6248d49ba317fd43cbacb099e974117b'
|
2022-12-10 12:07:22 +01:00
|
|
|
'6ca6dfbfb65bf4fec34aac4676f66bb602b5c4c3318fcc96236056d632c0c9af3c4eb775b491c2e722ed5de6a4c253677d6ee1a7be69e13045702fa3df8cf52f'
|
2022-06-08 21:02:54 +02:00
|
|
|
SKIP
|
|
|
|
SKIP)
|
2020-05-20 01:50:18 +02:00
|
|
|
|
|
|
|
prepare() {
|
2022-12-10 12:07:22 +01:00
|
|
|
sed -i "s|@PKGNAME@|${_pkgname}|;s|@ELECTRON@|${_electron}|" discord-launcher.sh
|
2022-09-15 19:43:31 +02:00
|
|
|
sed -i "s|Exec=.*|Exec=/usr/bin/$_pkgname|" Discord/discord.desktop
|
2020-05-20 01:50:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
# Install the app
|
2020-11-19 15:29:58 +01:00
|
|
|
install -d "$pkgdir"/usr/lib/$_pkgname
|
|
|
|
|
|
|
|
# HACKS FOR SYSTEM ELECTRON
|
|
|
|
asar e Discord/resources/app.asar Discord/resources/app
|
2020-12-04 22:28:44 +01:00
|
|
|
rm Discord/resources/app.asar
|
2020-11-19 15:29:58 +01:00
|
|
|
sed -i "s|process.resourcesPath|'/usr/lib/$_pkgname'|" Discord/resources/app/app_bootstrap/buildInfo.js
|
|
|
|
sed -i "s|exeDir,|'/usr/share/pixmaps',|" Discord/resources/app/app_bootstrap/autoStart/linux.js
|
2020-12-04 22:28:44 +01:00
|
|
|
asar p Discord/resources/app Discord/resources/app.asar --unpack-dir '**'
|
|
|
|
rm -rf Discord/resources/app
|
2020-05-20 01:50:18 +02:00
|
|
|
|
|
|
|
# Copy Relevanat data
|
2020-11-19 15:29:58 +01:00
|
|
|
cp -r Discord/resources/* "$pkgdir"/usr/lib/$_pkgname/
|
2020-05-20 01:50:18 +02:00
|
|
|
|
|
|
|
install -d "$pkgdir"/usr/{bin,share/{pixmaps,applications}}
|
2022-09-15 19:43:31 +02:00
|
|
|
install -Dm 755 "${srcdir}/discord-launcher.sh" "${pkgdir}/usr/bin/${_pkgname}"
|
2020-05-30 18:10:13 +02:00
|
|
|
|
2020-11-19 15:29:58 +01:00
|
|
|
cp Discord/discord.png "$pkgdir"/usr/share/pixmaps/$_pkgname.png
|
|
|
|
cp Discord/discord.desktop "$pkgdir"/usr/share/applications/$_pkgname.desktop
|
2020-05-20 01:50:18 +02:00
|
|
|
|
|
|
|
# Licenses
|
|
|
|
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
|
2021-01-13 17:12:42 +01:00
|
|
|
}
|