void-packages/srcpkgs/usb-modeswitch-data/template
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: 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

12 lines
555 B
Bash

# Template file for 'usb-modeswitch-data'
pkgname=usb-modeswitch-data
version=20191128
revision=2
build_style=gnu-makefile
make_install_args="RULESDIR=/usr/lib/udev/rules.d"
short_desc="Mode switching tool for controlling multi-mode USB devices - data files"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://www.draisberghof.de/usb_modeswitch/"
distfiles="http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-${version}.tar.bz2"
checksum=3f039b60791c21c7cb15c7986cac89650f076dc274798fa242231b910785eaf9