50 lines
1.7 KiB
Bash
50 lines
1.7 KiB
Bash
# Template file for 'discord-ptb'
|
|
pkgname=discord-ptb
|
|
version=0.0.33
|
|
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=37eb96945b86c2171cdb215e3e1b73e6bd2c65451fbfb54e8063a9b82cb30721
|
|
_license_checksum=41fe9e5a91c8f0af3a0a3833a0badf0ace75f1c4097889fafc0a029c68b96fcd
|
|
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.s 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
|
|
}
|