```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 ```
22 lines
634 B
Bash
22 lines
634 B
Bash
# Template file for 'mmv'
|
|
pkgname=mmv
|
|
version=1.01b
|
|
revision=4
|
|
wrksrc="${pkgname}-${version}.orig"
|
|
build_style=gnu-makefile
|
|
short_desc="Utility for wildcard renaming, copying, etc"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="GPL-2.0-only"
|
|
homepage="https://packages.debian.org/unstable/utils/mmv"
|
|
distfiles="http://mirrors.kernel.org/gentoo/distfiles/${pkgname}_${version}.orig.tar.gz"
|
|
checksum=0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef
|
|
|
|
do_install() {
|
|
local l
|
|
vbin mmv
|
|
vman mmv.1
|
|
for l in mcp mad mln; do
|
|
ln -s mmv ${DESTDIR}/usr/bin/$l
|
|
ln -s mmv.1 ${DESTDIR}/usr/share/man/man1/$l.1
|
|
done
|
|
}
|