void-packages/srcpkgs/oragono/template
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: 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

32 lines
856 B
Bash

# Template file for 'oragono'
pkgname=oragono
version=2.6.1
revision=1
build_style=go
go_import_path="github.com/oragono/oragono"
hostmakedepends="git"
short_desc="Modern IRC server (daemon/ircd) written in Go"
maintainer="Peter Bui <pbui@github.bx612.space>"
license="MIT"
homepage="https://oragono.io/"
distfiles="https://github.com/oragono/oragono/archive/v${version}.tar.gz"
checksum=d123f1aa413bb4541ca0b174286ccb372bf924cec2d635a7cde65791682c41bf
conf_files="/etc/oragono.conf"
system_accounts="_oragono"
_oragono_homedir="/var/lib/oragono"
make_dirs="
/var/lib/oragono 0755 _oragono _oragono"
post_install() {
vlicense LICENSE
vconf default.yaml oragono.conf
vmkdir usr/share/${pkgname}
vcopy oragono.motd usr/share/${pkgname}/default.motd
vmkdir usr/share/${pkgname}/i18n
vcopy "languages/*" usr/share/${pkgname}/i18n/
vsv oragono
}