void-packages/srcpkgs/python3-telegram/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par 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

22 lines
639 B
Bash

# Template file for 'python3-telegram'
pkgname=python3-telegram
version=0.14.0
revision=1
wrksrc=python-telegram-${version}
build_style=python3-module
hostmakedepends="python3"
depends="libtd python3-setuptools"
short_desc="Python library for building Telegram clients"
maintainer="Maxim Karasev <begs@disroot.org>"
license="MIT"
homepage="https://github.com/alexander-akhmetov/python-telegram"
distfiles="https://github.com/alexander-akhmetov/python-telegram/archive/${version}.tar.gz"
checksum=11b0a2387bae642eb7f134fe35b9ef67b8183aa961412bcdfa86ff404beed897
post_extract() {
rm -r telegram/lib
}
post_install() {
vlicense LICENSE
}