void-packages/srcpkgs/bmon/template
Đoàn Trần Công Danh c6ce65d3d0 srcpkgs/b*: 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
673 B
Bash

# Template file for 'bmon'
pkgname=bmon
version=4.0
revision=5
build_style=gnu-configure
hostmakedepends="automake pkg-config"
makedepends="ncurses-devel libnl3-devel confuse-devel"
short_desc="Bandwidth monitor and rate estimator"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="BSD-2-Clause, MIT"
homepage="http://github.com/tgraf/bmon/"
distfiles="http://github.com/tgraf/${pkgname}/archive/v${version}.tar.gz"
checksum=d5e503ff6b116c681ebf4d10e238604dde836dceb9c0008eb92416a96c87ca40
pre_configure() {
./autogen.sh
}
post_install() {
rm ${DESTDIR}/usr/share/doc/bmon/examples/bmon.conf
vsconf examples/bmon.conf
vlicense LICENSE.BSD
vlicense LICENSE.MIT
}