archrelease: copy trunk to community-any
[arch-community.git] / discord / repos / extra-x86_64 / PKGBUILD
blob0b5de40454a3268f94fa20f0e4c9301857f0446b
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.24
8 pkgrel=1
9 pkgdesc="All-in-one voice and text chat for gamers"
10 arch=('x86_64')
11 url='https://discordapp.com'
12 license=('custom')
13 options=(!strip)
14 depends=('libnotify' 'libxss' 'nspr' 'nss' 'gtk3')
15 optdepends=('libpulse: Pulseaudio support'
16             'xdg-utils: Open files')
17 source=("https://dl.discordapp.net/apps/linux/$pkgver/$pkgname-$pkgver.tar.gz"
18         "LICENSE-$pkgver.html::https://discordapp.com/terms"
19         "OSS-LICENSES-$pkgver.html::https://discordapp.com/licenses")
20 sha512sums=('9e1aa15bc1b1d8ebd2819ba88e7c012c47966d7f150264e732c849d4f15023729f8de4e5a5eb999603fa6102a02313dbf7d178b33cfacca58018dcd214ed4e40'
21             'e61b44993f35d8e2eb5159ede4b8afafdab59bce541c98b0d648ee8ebd13cef197284c461a4531108bbd70143328fde8bafc1f0560754de6bacabe937630213c'
22             '16881aebd512a3f4abe29c8555e394569b4527be79e1f28ee95fe603e9999ff58a3d70e31a202e719b5d9d3aa2d3b2291fa29886589ff1d81f55287c6f34cebb')
24 prepare() {
25   cd $_pkgname
26   sed -i "s|Exec=.*|Exec=/usr/bin/$pkgname|" $pkgname.desktop
27   echo 'Path=/usr/bin' >> $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