void-packages/srcpkgs/intel-undervolt/template
Đoàn Trần Công Danh 986c0a7d5e srcpkgs/i*: 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

12 lines
484 B
Bash

# Template file for 'intel-undervolt'
pkgname=intel-undervolt
version=1.7
revision=1
build_style=gnu-configure
conf_files="/etc/intel-undervolt.conf"
short_desc="Intel CPU undervolting tool"
maintainer="Renato Aguiar <renato@renatoaguiar.net>"
license="GPL-3.0-or-later"
homepage="https://github.com/kitsunyan/intel-undervolt"
distfiles="https://github.com/kitsunyan/intel-undervolt/archive/${version}.tar.gz"
checksum=29a7ebaee4830d65d0b5cefa6d497887d4f23f34659876dfe944f3a020cf33ff