void-packages/srcpkgs/python3-pwntools/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

26 lines
1,006 B
Bash

# Template file for 'python3-pwntools'
pkgname=python3-pwntools
version=4.5.1
revision=1
wrksrc="pwntools-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools"
makedepends="python3-devel"
depends="capstone-python3 python3 python3-Mako python3-Pygments
python3-dateutil python3-intervaltree python3-packaging python3-paramiko
python3-psutil python3-pyelftools python3-pyserial python3-pysocks
python3-requests python3-ropgadget python3-sortedcontainers"
make_install_args="--only-use-pwn-command"
short_desc="CTF framework and exploit development library"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT, BSD-2-Clause"
homepage="https://github.com/Gallopsled/pwntools"
distfiles="${PYPI_SITE}/p/pwntools/pwntools-${version}.tar.gz"
checksum=97f945aed7ffa9d3e87f8759df83a5eac6dc2112907f35d0aee66a9bf62fd8eb
post_install() {
rm -f ${DESTDIR}/usr/lib/python*/site-packages/*.md
rm -f ${DESTDIR}/usr/lib/python*/site-packages/*.txt
vlicense LICENSE-pwntools.txt LICENSE
}