void-packages/srcpkgs/cvsps2/template
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```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
```
2021-06-20 13:17:29 +07:00

22 lines
664 B
Bash

# Template file for 'cvsps2'
pkgname=cvsps2
version=2.1
revision=4
wrksrc=cvsps-${version}
build_style=gnu-makefile
makedepends="zlib-devel"
short_desc="Generating 'patchsets' from a CVS repo (for git-cvsimport)"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-only"
homepage="http://cvsps.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/cvsps/cvsps-${version}.tar.gz"
checksum=91d3198b33463861a581686d5fcf99a5c484e7c4d819384c04fda9cafec1075a
post_extract() {
sed -i 's/linux/__GLIBC__/g' cbtcommon/text_util.c
sed -i 's/CFLAGS+=/override &/' Makefile
sed -i 's/ -lz/ $(LDFLAGS) &/' Makefile
}
do_install() {
make install prefix=$DESTDIR/usr
}