void-packages/srcpkgs/libssh/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

37 lines
1,000 B
Bash

# Template file for 'libssh'
pkgname=libssh
version=0.9.5
revision=2
build_style=cmake
configure_args="-DUNIT_TESTING=ON"
hostmakedepends="pkg-config python3"
makedepends="zlib-devel openssl-devel cmocka-devel"
checkdepends="openssh"
short_desc="Multiplatform C library implementing the SSH v2 protocol"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://www.libssh.org/"
distfiles="https://git.libssh.org/projects/libssh.git/snapshot/${pkgname}-${version}.tar.gz"
checksum=df65d6054554e8ff5458628808ce8d68b928175f4fefa1c833582b9568491e64
case "$XBPS_TARGET_MACHINE" in
*-musl) configure_args="-DHAVE_GLOB=0" ;;
esac
if [ "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DUNIT_TESTING=ON"
else
configure_args+=" -DUNIT_TESTING=OFF"
fi
libssh-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
}
}