diff --git a/srcpkgs/discord-ptb/template b/srcpkgs/discord-ptb/template index 0485c22202..867ba7e5dc 100644 --- a/srcpkgs/discord-ptb/template +++ b/srcpkgs/discord-ptb/template @@ -1,19 +1,32 @@ # Template file for 'discord-ptb' -pkgname="discord-ptb" -version=0.0.9 +pkgname=discord-ptb +version=0.0.22 revision=1 -wrksrc="DiscordPTB" -depends="alsa-lib dbus-glib gtk+3 GConf libnotify nss libXtst libcxx libatomic" archs="x86_64" -nopie=yes -repository=nonfree -restricted=yes +wrksrc="DiscordPTB" +hostmakedepends="w3m" +depends="alsa-lib dbus-glib gtk+3 GConf libnotify nss libXtst libcxx libatomic" short_desc="Proprietary freeware VoIP application" maintainer="Abel Graham " -license="proprietary" -homepage="https://discordapp.com/" +license="custom:Proprietary" +homepage="https://discord.com/" distfiles="https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz" -checksum=372d6f75203626370218c97c21519b779e5af334177cafa65a5655e357c77520 +checksum=3225e1f1c96e781566ece413968dcc8fb5cad6aa5ec5830f36349e9622821e1b +_license_checksum=9abbd207c86f76a59c0017c131dc7a30089c40b4dacb54a0f339272468344e1e +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/,/^Your place to talk$/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 @@ -22,9 +35,14 @@ do_install() { vmkdir usr/share/applications vcopy discord-ptb.desktop /usr/share/applications/ vmkdir ${package_location} - for item in locales resources DiscordPTB libffmpeg.so libnode.so natives_blob.bin snapshot_blob.bin content_shell.pak icudtl.dat; do + for item in DiscordPTB chrome_100_percent.pak chrome_200_percent.pak \ + icudtl.dat libEGL.so libGLESv2.so libffmpeg.so locales natives_blob.bin \ + resources resources.pak snapshot_blob.bin swiftshader \ + v8_context_snapshot.bin; do vcopy "${item}" "${package_location}" done vmkdir usr/bin ln -sfr $DESTDIR/${package_location}/DiscordPTB $DESTDIR/usr/bin/discord-ptb + + vlicense EULA }