void-packages/srcpkgs/binwalk/template
Đoàn Trần Công Danh c6ce65d3d0 srcpkgs/b*: convert patches to -Np1
```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

27 lines
731 B
Bash

# Template file for 'binwalk'
pkgname=binwalk
version=2.3.1
revision=1
build_style=python3-module
pycompile_module="binwalk"
hostmakedepends="python3"
depends="python3"
checkdepends="python3-coverage python3-nose"
short_desc="Easy tool for analyzing/reversing/extracting firmware images"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MIT"
homepage="https://github.com/ReFirmLabs/binwalk"
distfiles="https://github.com/ReFirmLabs/binwalk/archive/v${version}.tar.gz"
checksum=7ec9d8fcb8686f4060d37e1096669e3ed8ce1194c91ad80199622448bcc01b19
post_extract() {
vsed -i -e 's;/etc/bash_completion.d/%s;%s.bash;' setup.py
}
do_check() {
PYTHONPATH="${wrksrc}/src" python3 setup.py test
}
post_install() {
vlicense LICENSE
}