```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
```
21 lines
636 B
Bash
21 lines
636 B
Bash
# Template file for 'xautolock'
|
|
pkgname=xautolock
|
|
version=2.2
|
|
revision=6
|
|
hostmakedepends="imake xorg-cf-files"
|
|
makedepends="libXScrnSaver-devel xorgproto"
|
|
short_desc="Autolock utility for X"
|
|
maintainer="Tj Vanderpoel (bougyman) <tj@rubyists.com>"
|
|
license="GPL-2"
|
|
homepage="http://www.ibiblio.org/pub/Linux/X11/screensavers/"
|
|
distfiles="${homepage}/${pkgname}-${version}.tgz"
|
|
checksum=11f0275175634e6db756e96f5713ec91b8b1c41f8663df54e8a5d27dc71c4da2
|
|
|
|
do_build() {
|
|
CC=cc xmkmf
|
|
make CC=$CC CDEBUGFLAGS="-D_DEFAULT_SOURCE ${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}"
|
|
}
|
|
do_install() {
|
|
make MANSUFFIX=1 DESTDIR=${DESTDIR} install install.man
|
|
}
|