b6bcd8cd34
* daemontools and dmraid is kept at -Np0 ```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
48 lines
1.6 KiB
Bash
48 lines
1.6 KiB
Bash
# Template file for 'discord-ptb'
|
|
pkgname=discord-ptb
|
|
version=0.0.25
|
|
revision=1
|
|
archs="x86_64"
|
|
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 <abel@abelgraham.com>"
|
|
license="custom:Proprietary"
|
|
homepage="https://discord.com/"
|
|
distfiles="https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz"
|
|
checksum=41ac91f87651361816fa49e07c1f25334f9907df03e8b2e76d8d45e6757d5e20
|
|
_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
|
|
vmkdir usr/share/pixmaps
|
|
vinstall discord.png 644 /usr/share/pixmap/ 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; do
|
|
vcopy "${item}" "${package_location}"
|
|
done
|
|
vmkdir usr/bin
|
|
ln -sfr $DESTDIR/${package_location}/DiscordPTB $DESTDIR/usr/bin/discord-ptb
|
|
|
|
vlicense EULA
|
|
}
|