void-packages/srcpkgs/vpn-ws/template
Đoàn Trần Công Danh 76acfa2dd2 srcpkgs/v*: 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

27 lines
759 B
Bash

# Template file for 'vpn-ws'
pkgname=vpn-ws
version=0.2
revision=7
build_style=gnu-makefile
make_use_env=yes
makedepends="openssl-devel"
short_desc="VPN system over webhooks"
maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
license="MIT"
homepage="https://github.com/unbit/vpn-ws"
distfiles="https://github.com/unbit/vpn-ws/archive/v${version}.tar.gz"
checksum=f35d16d192ef333390ccc7d342df4392676a86502fa087f310eab9758afd565a
CFLAGS+=" -Wno-stringop-truncation -fcommon"
# no install target in the Makefile
do_install() {
vbin vpn-ws
vbin vpn-ws-client
vdoc README.md
vdoc tutorials/ubuntu_trusty_nginx_bridge_client_certificates.md
# not example config, but close enough
vsconf clients/vpn.pl
vsconf clients/vpn_linux_tornado.py
vlicense LICENSE
}