void-packages/srcpkgs/teensy_loader_cli/template
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: 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

17 lines
554 B
Bash

# Template file for 'teensy_loader_cli'
pkgname=teensy_loader_cli
version=2.1
revision=1
build_style=gnu-makefile
make_build_target=teensy_loader_cli
makedepends="libusb-compat-devel"
short_desc="Command line Teensy Loader"
maintainer="Dominic Monroe <monroef4@googlemail.com>"
license="GPL-3"
homepage="http://www.pjrc.com/teensy/loader_cli.html"
distfiles="https://github.com/PaulStoffregen/teensy_loader_cli/archive/${version}.tar.gz"
checksum=5c36fe45b9a3a71ac38848b076cd692bf7ca8826a69941c249daac3a1d95e388
do_install() {
vbin teensy_loader_cli
}