void-packages/srcpkgs/latencytop/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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
601 B
Bash

# Template file for 'latencytop'
pkgname=latencytop
version=0.5
revision=4
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="gtk+-devel ncurses-devel"
short_desc="Measuring and fixing Linux latency"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2"
homepage="http://www.latencytop.org"
distfiles="${DEBIAN_SITE}/main/l/$pkgname/${pkgname}_${version}.orig.tar.gz"
checksum=9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef
pre_build() {
export CFLAGS="$CFLAGS $LDFLAGS"
}
do_install() {
vmkdir usr/bin
make DESTDIR=$PKGDESTDIR SBINDIR=/usr/bin install
}