archrelease: copy trunk to community-any
[ArchLinux/community.git] / discord / repos / community-x86_64 / PKGBUILD
blob35d52f2442924e279d1ce3b390fa822e4773ef22
1 # Maintainer: Filipe LaĆ­ns (FFY00) <lains@archlinux.org>
2 # Maintainer: Morgan <morganamilo@archlinux.org>
3 # Maintainer: T.J. Townsend <blakkheim@archlinux.org>
5 pkgname=discord
6 _pkgname=Discord
7 pkgver=0.0.27
8 pkgrel=1
9 pkgdesc="All-in-one voice and text chat for gamers"
10 arch=('x86_64')
11 url='https://discord.com'
12 license=('custom')
13 options=(!strip)
14 depends=('libnotify' 'libxss' 'nspr' 'nss' 'gtk3')
15 optdepends=('libpulse: Pulseaudio support'
16             'libappindicator-gtk3: Systray indicator support'
17             'xdg-utils: Open files')
18 source=("https://dl.discordapp.net/apps/linux/$pkgver/$pkgname-$pkgver.tar.gz"
19         "LICENSE-$pkgver.html::https://discordapp.com/terms"
20         "OSS-LICENSES-$pkgver.html::https://discordapp.com/licenses")
21 sha512sums=('285a0119b4740402a3fa94d3679a52bc8d883413ee32187e90087960a4d34aaf316788d2708bbccafe3f995c2b99767b45bc4b7c731704ef887a8de1b3d3926f'
22             'afe3167479dfba984d43642e7eb42e9437d6e0caa512118b2604cb54dbcc833370ccfaf07fc0e8077ad59fc5053a4380c2234628e6aaa519bc0dd04fa3ec0f27'
23             'a8ef6434be9ffd3f53194047610856804418c204ddeab937a8fa75511c0db1c2556b89e94e899760494a275a9b3805876f99319a5c8c018196002ba8695e873d')
25 prepare() {
26   cd $_pkgname
27   sed -i "s|Exec=.*|Exec=/usr/bin/$pkgname|" $pkgname.desktop
30 package() {
31   install -d "$pkgdir"/opt/$pkgname
32   cp -a $_pkgname/. "$pkgdir"/opt/$pkgname
34   chmod 755 "$pkgdir"/opt/$pkgname/$_pkgname
36   rm "$pkgdir"/opt/$pkgname/postinst.sh
38   install -d "$pkgdir"/usr/{bin,share/{pixmaps,applications}}
39   ln -s /opt/$pkgname/$_pkgname "$pkgdir"/usr/bin/$pkgname
40   ln -s /opt/$pkgname/discord.png "$pkgdir"/usr/share/pixmaps/$pkgname.png
41   ln -s /opt/$pkgname/$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
43   # setuid on chrome-sandbox
44   chmod u+s "$pkgdir"/opt/$pkgname/chrome-sandbox
46   install -Dm644 LICENSE-$pkgver.html "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.html
47   install -Dm644 OSS-LICENSES-$pkgver.html "$pkgdir"/usr/share/licenses/$pkgname/OSS-LICENSES.html