void-packages/srcpkgs/hosts-update/template
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: 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

17 lines
453 B
Bash

# Template file for 'hosts-update'
pkgname=hosts-update
version=1.38
revision=1
build_style=gnu-makefile
depends="bash curl"
short_desc="Updates /etc/hosts with the mvps blocklist"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/graysky2/hosts-update"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum="9a0fdb028beaf9fa4c2ec5f1a0030fcfe1a996ea42b874b944ec07885ca0f2ba"
post_install() {
vlicense MIT
}