void-packages/srcpkgs/mon/template
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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

24 lines
600 B
Bash

# Template file for 'mon'
pkgname=mon
version=1.2.3
revision=2
build_style=gnu-makefile
short_desc="Simple single-process process monitoring program written in C"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="MIT"
homepage="https://github.com/tj/mon"
distfiles="https://github.com/tj/mon/archive/${version}.tar.gz"
checksum=978711a1d37ede3fc5a05c778a2365ee234b196a44b6c0c69078a6c459e686ac
CFLAGS="-Ideps -std=c99 -D_GNU_SOURCE"
post_extract() {
sed -i '/CC.*-o/s/$/ $(LDFLAGS)/' Makefile
}
do_install() {
vbin mon
vsconf example/on_error.sh
vsconf example/program.sh
vdoc Readme.md
}