# Maintainer: Knut Ahlers # Contributor: Filipe LaĆ­ns (FFY00) pkgname=discord _pkgname=Discord pkgver=0.0.14 pkgrel=1 pkgdesc="All-in-one voice and text chat for gamers that's free and secure." arch=('x86_64') url='https://discordapp.com' license=('custom') depends=('libnotify' 'libxss' 'nspr' 'nss' 'gtk3') optdepends=('libpulse: Pulseaudio support' 'xdg-utils: Open files') source=("https://dl.discordapp.net/apps/linux/$pkgver/$pkgname-$pkgver.tar.gz" 'LICENSE.html::https://discordapp.com/terms' 'OSS-LICENSES.html::https://discordapp.com/licenses') sha512sums=('739448260b697dd4f004da95406337fbddcdfb85adc375c9dff4a5295bd255a035833da60cc5617c47949982a44b0509d9d50ed82ea01434d13348870ae5b55c' 'c45e3556725116ebbb63476d2c63e824156cb475ead078fac312bfaa24a17888d51bdd732669fe3ff674cd94baef681897b7dd84a48a8a567694414bca3ae298' '438b1efcb2af16689c769cb3dbfa0b8f143466d149d9b42dfccb199f6eeee7e5275a00f3be48de5f5c2efd5c36ff46e3b52b83c51b3562e387a9d8ce387ce3c8') prepare() { cd $_pkgname sed -i "s|Exec=.*|Exec=/usr/bin/$pkgname|" $pkgname.desktop echo 'Path=/usr/bin' >>$pkgname.desktop } package() { # Install the app 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 # 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 }