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

42 lines
998 B
Bash

# Template file for 'heyu'
pkgname=heyu
version=2.10.1
revision=3
build_style=configure
configure_script="./Configure"
configure_args="linux"
short_desc="X10 automation for Linux"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="http://www.heyu.org"
distfiles="https://github.com/HeyuX10Automation/heyu/archive/v${version}.tar.gz"
checksum=621a20f45eef62070b3f95ad17ecbc3e7e1f7352d25dac86093ff6938b606baa
CFLAGS="-fcommon"
pre_configure() {
sed -i 's:local/::' Configure
sed -i 's:/man:/share/man:' Configure
sed -i 's:gcc:${CC}:' Configure
sed -i 's:\$(DFLAGS):\$(DFLAGS) \${CFLAGS}:' Configure
}
do_install() {
# The provided 'make install' target is beyond patching
vbin heyu
vmkdir etc/heyu
vinstall x10config.sample 0666 etc/heyu x10.conf
vman heyu.1
vman x10config.5
vman x10sched.5
vman x10scripts.5
vman x10cm17a.5
vman x10aux.5
vman x10rfxsensors.5
vman x10rfxmeters.5
vman x10digimax.5
vman x10oregon.5
vman x10kaku.5
}