void-packages/srcpkgs/mosh/template
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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

19 lines
686 B
Bash

# Template file for 'mosh'
pkgname=mosh
version=1.3.2
revision=22
build_style=gnu-configure
hostmakedepends="pkg-config protobuf"
makedepends="ncurses-devel protobuf-devel libutempter-devel openssl-devel"
depends="perl-IO-Tty"
short_desc="Mobile shell, remote terminal application that allows roaming"
maintainer="Nathan Owens <ndowens04@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://mosh.org/"
distfiles="https://mosh.org/mosh-${version}.tar.gz"
checksum=da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216
pre_configure() {
# make local.test always succeed. It fails due to missing X server in chroot.
printf "%s\n" "#!/bin/sh" ":" > src/tests/local.test
}