c6ce65d3d0
```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 ```
28 lines
724 B
Bash
28 lines
724 B
Bash
# Template file for 'bsdiff'
|
|
pkgname=bsdiff
|
|
version=4.3
|
|
revision=5
|
|
makedepends="bzip2-devel"
|
|
short_desc="Binary diff/patch utility"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="BSD-2-Clause"
|
|
homepage="http://www.daemonology.net/bsdiff"
|
|
distfiles="${DEBIAN_SITE}/main/b/bsdiff/bsdiff_${version}.orig.tar.gz"
|
|
#distfiles="${homepage}/${pkgname}-${version}.tar.gz"
|
|
checksum=18821588b2dc5bf159aa37d3bcb7b885d85ffd1e19f23a0c57a58723fea85f48
|
|
|
|
do_build() {
|
|
for i in diff patch; do
|
|
sed -i 's%u_char%unsigned char%' bs${i}.c;
|
|
$CC $CFLAGS -Wall -lbz2 $LDFLAGS bs${i}.c -o bs${i}
|
|
done
|
|
}
|
|
|
|
do_install() {
|
|
for i in diff patch; do
|
|
vbin bs${i}
|
|
vman bs${i}.1
|
|
done
|
|
sed -n '0,/^$/p' bsdiff.c > LICENSE
|
|
vlicense LICENSE
|
|
}
|