```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
```
17 lines
649 B
Bash
17 lines
649 B
Bash
# Template file for 'usb-modeswitch'
|
|
pkgname=usb-modeswitch
|
|
version=2.6.0
|
|
revision=1
|
|
build_style=gnu-makefile
|
|
conf_files="/etc/usb_modeswitch.conf"
|
|
make_install_args="SBINDIR=/usr/bin UDEVDIR=/usr/lib/udev"
|
|
hostmakedepends="pkg-config tcl"
|
|
makedepends="libusb-devel"
|
|
depends="tcl ${pkgname}-data"
|
|
short_desc="Mode switching tool for controlling multi-mode USB devices"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="GPL-2"
|
|
homepage="http://www.draisberghof.de/usb_modeswitch/"
|
|
distfiles="http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-${version}.tar.bz2"
|
|
checksum=c215236e6bada6e659fc195a31d611ea298a4bdb4d57a0d68c553b56585f8ba3
|