void-packages/srcpkgs/nmon/template
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: 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

27 lines
706 B
Bash

# Template file for 'nmon'
pkgname=nmon
version=16m
revision=2
build_style=fetch
makedepends="ncurses-devel"
depends="ncurses"
short_desc="Nigel's performance Monitor for Linux"
maintainer="Kyle Nusbaum <knusbaum+void@sdf.org>"
license="GPL-3.0-or-later"
homepage="http://nmon.sourceforge.net/pmwiki.php?n=Main.HomePage"
distfiles="${SOURCEFORGE_SITE}/nmon/files/lmon${version}.c"
checksum=2bed4d45fdfdf1d1387ec91e139c04975d5f838e3e0d53c0fe2d803a707e5fc1
do_build() {
case "$XBPS_TARGET_MACHINE" in
ppc*) _ARCH="POWER" ;;
arm*|aarch64*) _ARCH="ARM" ;;
i686*|x86_64*) _ARCH="X86" ;;
esac
$CC ${CFLAGS} ${LDFLAGS} -D $_ARCH \
lmon${version}.c -lncurses -lm -o nmon
}
do_install() {
vbin nmon
}