# Maintainer: Tim Schumacher # Contributor: Filipe LaĆ­ns (FFY00) # Contributor: Morgan pkgname=discord-ptb _pkgname=DiscordPTB pkgver=0.0.81 pkgrel=1 pkgdesc="All-in-one voice and text chat for gamers - public test build" arch=('x86_64') url='https://discordapp.com' license=('custom') options=(!strip) depends=('libnotify' 'libxss' 'nspr' 'nss' 'gtk3') optdepends=('libpulse: Pulseaudio support' 'xdg-utils: Open files' 'noto-fonts-cjk: Font for special characters such as /shrug face' 'emoji-font: Fonts for emoji support') source=("https://dl-ptb.discordapp.net/apps/linux/$pkgver/$pkgname-$pkgver.tar.gz" 'LICENSE.html::https://discordapp.com/terms' 'OSS-LICENSES.html::https://discordapp.com/licenses') sha512sums=('c94aeaa4a957efca2c7e0e7c64a05a18ff36955859b5d4e02201e82d7267fd4990b7abb145e1efde99444f2cae14ac44f1d39638eb151aed80443e095422ff88' 'SKIP' 'SKIP') prepare() { cd $_pkgname sed -i "s|Exec=.*|Exec=/usr/bin/$pkgname|" $pkgname.desktop echo 'Path=/usr/bin' >> $pkgname.desktop } package() { 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,share/{pixmaps,applications}} 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 # setuid on chrome-sandbox chmod u+s "$pkgdir"/opt/$pkgname/chrome-sandbox install -Dm644 LICENSE.html "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.html install -Dm644 OSS-LICENSES.html "$pkgdir"/usr/share/licenses/$pkgname/OSS-LICENSES.html }