void-packages/srcpkgs/tsocks/template
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: 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
627 B
Bash

# Template file for 'tsocks'
pkgname=tsocks
version=1.8beta5
revision=4
wrksrc="tsocks-1.8"
build_style=gnu-configure
configure_args="--libdir=/usr/lib"
hostmakedepends="automake"
short_desc="Transparent SOCKS proxying library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://tsocks.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/tsocks/tsocks-$version.tar.gz"
checksum=849d7ef5af80d03e76cc05ed9fb8fa2bcc2b724b51ebfd1b6be11c7863f5b347
pre_configure() {
autoreconf -fi
}
post_install() {
vmkdir usr/share/examples/tsocks
install -m644 *.example ${DESTDIR}/usr/share/examples/tsocks
}