void-packages/srcpkgs/ttyrec/template
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: 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

23 lines
645 B
Bash

# Template file for 'ttyrec'
pkgname=ttyrec
version=1.0.8
revision=6
short_desc="Record and playback activity on a tty"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-4-Clause-UC"
homepage="http://0xcc.net/ttyrec"
distfiles="http://0xcc.net/ttyrec/${pkgname}-${version}.tar.gz"
checksum=ef5e9bf276b65bb831f9c2554cd8784bd5b4ee65353808f82b7e2aef851587ec
do_build() {
sed -i 's/\$(CFLAGS)/$(LDFLAGS)/' Makefile
make ${makejobs} CC=$CC CFLAGS="-DHAVE_openpty $CFLAGS" LDFLAGS="-lutil $LDFLAGS"
}
do_install() {
for f in rec play time; do
vbin tty${f}
vman tty${f}.1
done
sed -n '1,32p' ttyrec.c > LICENSE
vlicense LICENSE
}