void-packages/srcpkgs/discord-ptb/template
0x5c 8055fdbf6c discord-ptb: change the maintainer
- previous maintainer has abandoned the package
2021-10-01 05:25:49 -03:00

49 lines
1.7 KiB
Bash

# Template file for 'discord-ptb'
pkgname=discord-ptb
version=0.0.26
revision=1
archs="x86_64"
wrksrc="DiscordPTB"
hostmakedepends="w3m"
depends="alsa-lib dbus-glib gtk+3 libnotify nss libXtst libcxx libatomic
xdg-utils webrtc-audio-processing"
short_desc="Chat and VoIP application (preview version)"
maintainer="0x5c <dev@0x5c.io>"
license="custom:Proprietary"
homepage="https://discord.com/"
distfiles="https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz"
checksum=04b33c73a4d55c476c8332bd86e50add6d984c965f0d4b5b759ccb0ebd3992e6
_license_checksum=03580ea1297c38f31c4437555f2dbf9dae25a91c9e61391d7141cf8cc036aeff
nopie=yes
restricted=yes
repository=nonfree
post_extract() {
$XBPS_FETCH_CMD -o eula https://discord.com/terms; cat eula |
w3m -dump -I utf-8 -T text/html |
sed -n '/Discord Terms of Service/,/^Imagine a place$/p' > EULA
filesum="$(xbps-digest EULA)"
if [ "$filesum" != "$_license_checksum" ]; then
msg_error "SHA256 mismatch for EULA:\n$filesum\n"
fi
}
do_install() {
local package_location="usr/lib/$pkgname" item
vmkdir usr/share/pixmaps
vinstall discord.png 644 /usr/share/pixmaps/ discord-ptb.png
vmkdir usr/share/applications
vcopy discord-ptb.desktop /usr/share/applications/
vmkdir ${package_location}
for item in DiscordPTB chrome_100_percent.pak chrome_200_percent.pak \
icudtl.dat libEGL.so libGLESv2.so libffmpeg.so locales resources \
resources.pak snapshot_blob.bin swiftshader v8_context_snapshot.bin \
discord.png chrome-sandbox libvk_swiftshader.so postinst.sh ; do
vcopy "${item}" "${package_location}"
done
vmkdir usr/bin
ln -sfr $DESTDIR/${package_location}/DiscordPTB $DESTDIR/usr/bin/discord-ptb
vlicense EULA
}