void-packages/srcpkgs/bonnie++/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

25 lines
692 B
Bash

# Template file for 'bonnie++'
pkgname=bonnie++
version=1.98
revision=1
build_style=gnu-configure
short_desc="Hard Drive and Filesystem benchmark utility"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://www.coker.com.au/bonnie++/"
distfiles="http://www.coker.com.au/bonnie++/bonnie++-${version}.tgz"
checksum=6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04
post_extract() {
sed -i -e 's/sbin/bin/g' \
-e '/-o getc_putc_helper/s/CXX/LINK/' \
-e '/$(LINK)/s/$/ $(LDFLAGS)/' \
-e 's#@mandir@#$(eprefix)/share/man#g' \
Makefile.in
}
pre_build() {
export MORECFLAGS="$CFLAGS"
}
do_install() {
make prefix=${DESTDIR}/usr install
}