Files
discord/PKGBUILD
Cory Sanin 8cc1d8d469
Some checks failed
Publish / Build and publish (push) Failing after -2m1s
[world] 'discord-1:0.0.115-1' add
2025-11-18 14:13:59 -05:00

57 lines
2.2 KiB
Bash

# Maintainer: Cory Sanin <corysanin@artixlinux.org>
# Contributor: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Morgan <morganamilo@archlinux.org>
# Contributor: Robin Candau <antiz@archlinux.org>
# Contributor: Christian Heusel <gromit@archlinux.org>
# Contributor: T.J. Townsend <blakkheim@archlinux.org>
pkgname=discord
_pkgname=Discord
pkgver=0.0.115
pkgrel=1
epoch=1
pkgdesc="All-in-one voice and text chat for gamers"
arch=('x86_64')
url='https://discord.com'
license=('custom')
options=(!debug !strip)
optdepends=('libpulse: PulseAudio support'
'libappindicator-gtk3: Systray indicator support'
'xdg-utils: For opening URLs and files')
source=("https://dl.discordapp.net/apps/linux/$pkgver/$pkgname-$pkgver.tar.gz"
"LICENSE-$pkgver.html::https://discordapp.com/terms"
"OSS-LICENSES-$pkgver.html::https://discordapp.com/licenses")
sha512sums=('92fea8b546027d972901cf7773f0736f61b66b8b0d7f96b0b18f0a65a6299983d29a9b630970f9ce0216b39d6148bed37e67274ae8a4fbdc54937d11b3cf222f'
'4a7243aa4ba5ba11b2c931f36941ceab2693cb6d89708bb7c608d4c8de5d92ff5421fd0cf415667e02d453c34e063f301c531d698fcd62ccf2aecd0808ec5288'
'6427178f18d8b4e740eba0fcaa293fb4ed2de14fa0a88f7e33e0259dec9363cef63086bc0068abbbe1677fead0317be368bdcd53ea270c44e92b0e58e8986d32')
prepare() {
cd $_pkgname
sed -i "s|Exec=.*|Exec=/usr/bin/$pkgname|" $pkgname.desktop
}
package() {
depends=('libnotify' 'libxss' 'nspr' 'nss' 'gtk3')
install -d "$pkgdir"/opt/$pkgname
cp -a $_pkgname/. "$pkgdir"/opt/$pkgname
chmod 755 "$pkgdir"/opt/$pkgname/$_pkgname
rm "$pkgdir"/opt/$pkgname/postinst.sh
install -d "$pkgdir"/usr/bin
ln -s /opt/$pkgname/$_pkgname "$pkgdir"/usr/bin/$pkgname
install -d "$pkgdir"/usr/share/applications
ln -s /opt/$pkgname/$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
install -d "$pkgdir"/usr/share/icons/hicolor/256x256/apps
ln -s /opt/$pkgname/discord.png "$pkgdir"/usr/share/icons/hicolor/256x256/apps/$pkgname.png
# setuid on chrome-sandbox
chmod u+s "$pkgdir"/opt/$pkgname/chrome-sandbox
install -Dm644 LICENSE-$pkgver.html "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.html
install -Dm644 OSS-LICENSES-$pkgver.html "$pkgdir"/usr/share/licenses/$pkgname/OSS-LICENSES.html
}