void-packages/srcpkgs/discord-ptb/template
0x5c b363e25fef discord-ptb: update to 0.0.27.
- Added and tested 'update' file based on package 'discord'
2021-12-17 05:19:48 -03:00

49 lines
1.7 KiB
Bash

# Template file for 'discord-ptb'
pkgname=discord-ptb
version=0.0.27
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=0bef5643b57ec9ee42f5d107565e13a0ea83e1b26011e1cd5520fbcb8bd1f07a
_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
}