abinfo "This build script was adapted from Arch Linux (extra/discord)."

abinfo "Installing Discord ..."
install -Dvm755 "$SRCDIR"/discord "$PKGDIR"/usr/bin/discord
install -Dvm755 "$SRCDIR"/updater_bootstrap "$PKGDIR"/usr/share/discord/updater_bootstrap
install -Dvm644 "$SRCDIR"/discord.desktop "$PKGDIR"/usr/share/applications/discord.desktop
install -Dvm644 "$SRCDIR"/discord.png "$PKGDIR"/usr/share/icons/hicolor/256x256/apps/discord.png

abinfo "Downloading license agreements ..."
mkdir -vp "$PKGDIR"/usr/share/doc/discord
wget https://discordapp.com/terms \
    -O "$PKGDIR"/usr/share/doc/discord/LICENSE.html
wget https://discordapp.com/licenses \
    -O "$PKGDIR"/usr/share/doc/discord/OSS-LICENSES.html

