```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 ```
25 lines
713 B
Bash
25 lines
713 B
Bash
# Template file for 'buffer'
|
|
pkgname=buffer
|
|
version=2014.11.26
|
|
revision=3
|
|
_gitrev=2b58f5b78f7511b4d4e2eb0e9f8b0af16dea3985
|
|
wrksrc=${pkgname}-${_gitrev}
|
|
build_style=gnu-makefile
|
|
short_desc="Speed up writing tapes on remote tape drives"
|
|
maintainer="jbu <pullmoll@t-online.de>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://github.com/scotte/buffer"
|
|
distfiles="https://github.com/scotte/buffer/archive/${_gitrev}.tar.gz>${pkgname}-${version}.tar.gz"
|
|
checksum=14a881fcd070b1dcd8ec91d8d036f22094c22ac3769c274f0d7d6799038a73c3
|
|
|
|
pre_build() {
|
|
sed -i Makefile \
|
|
-e"s;^\(CC\)=.*;\1=$CC;" \
|
|
-e's;$(CC) -o buffer $(CFLAGS) buffer.o sem.o;& $(LDFLAGS);'
|
|
}
|
|
|
|
do_install() {
|
|
vbin buffer
|
|
mv buffer.{man,1}
|
|
vman buffer.1
|
|
}
|