# Maintainer: Cory Sanin # Contributor: Filipe LaĆ­ns (FFY00) # Contributor: Morgan # Contributor: Robin Candau # Contributor: Christian Heusel # Contributor: T.J. Townsend pkgname=discord _pkgname=Discord pkgver=0.0.116 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=('801a228ff7c84aba76ce4565535d1da1d0ee3e7c30e2c381a118db32b2c7dcbdfe0f52ea8caa369732ca29c5a23a3ef7bb5439adc57e70243beb6ab7fc539a7f' 'SKIP' 'SKIP') 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 }