void-packages/srcpkgs/fake-hwclock/template
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```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

22 lines
700 B
Bash

# Template file for 'fake-hwclock'
pkgname=fake-hwclock
version=0.12
revision=1
wrksrc=git
short_desc="Save/restore system clock on machines without working RTC hardware"
maintainer="Ivan Gonzalez Polanco <ivan14polanco@gmail.com>"
license="GPL-2.0-only"
homepage="https://tracker.debian.org/pkg/fake-hwclock"
distfiles="${DEBIAN_SITE}/main/f/${pkgname}/${pkgname}_${version}.tar.xz"
checksum=02a825f7460ab06b370c203250606c67b0effffa1645a4a4f7ff3928eec4957e
conf_files="/etc/default/fake-hwclock"
do_install() {
vbin fake-hwclock
vinstall etc/default/fake-hwclock 644 etc/default
vinstall debian/fake-hwclock.cron.hourly 755 etc/cron.hourly fake-hwclock
vman fake-hwclock.8
vsv fake-hwclock
}