void-packages/srcpkgs/discord/template
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* 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
```
2021-06-20 13:17:29 +07:00

37 lines
1.2 KiB
Bash

# Template file for 'discord'
pkgname=discord
version=0.0.15
revision=1
archs="x86_64"
wrksrc="Discord"
depends="alsa-lib dbus-glib gtk+3 libnotify nss libXtst libcxx libatomic"
short_desc="Chat and VOIP application"
maintainer="Ryan Conwell <ryanconwell@protonmail.com>"
license="custom:Proprietary"
homepage="https://discordapp.com"
distfiles="https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"
checksum=adede954e9c696d96e254759b539527a24ab1d42f0d548c5c4309d1a3fc3c25e
repository=nonfree
restricted=yes
nopie=yes
do_install() {
local package_location="usr/lib/$pkgname" item
vmkdir usr/share/pixmaps
vcopy discord.png /usr/share/pixmaps/
vmkdir usr/share/applications
vcopy discord.desktop /usr/share/applications/
vmkdir ${package_location}
chmod +x Discord
for item in locales resources Discord libffmpeg.so snapshot_blob.bin discord.png\
icudtl.dat libEGL.so libGLESv2.so chrome_100_percent.pak chrome_200_percent.pak \
chrome-sandbox resources.pak swiftshader v8_context_snapshot.bin postinst.sh \
libvk_swiftshader.so libvulkan.so; do
vcopy "${item}" "${package_location}"
done
vmkdir usr/bin
ln -sfr $DESTDIR/${package_location}/Discord $DESTDIR/usr/bin/Discord
}
post_install() {
vlicense $FILESDIR/LICENSE
}