void-packages/srcpkgs/libu2f-host/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

32 lines
1 KiB
Bash

# Template file for 'libu2f-host'
pkgname=libu2f-host
version=1.1.10
revision=5
wrksrc="${pkgname}-${pkgname}-${version}"
build_style=gnu-configure
configure_args="--with-openssl=yes"
hostmakedepends="automake gengetopt libtool pkg-config"
makedepends="hidapi-devel json-c-devel openssl-devel"
depends="libfido2"
short_desc="C library and tool that implements the host-side of the U2F protocol"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later, GPL-3.0-or-later"
homepage="https://developers.yubico.com/libu2f-host/"
#changelog="https://raw.githubusercontent.com/Yubico/libu2f-host/master/NEWS"
distfiles="https://github.com/Yubico/libu2f-host/archive/libu2f-host-${version}.tar.gz"
checksum=45937c6c04349f865d9f047d3a68cc50ea24e9085d18ac2c7d31fa38eb749303
pre_configure() {
autoreconf -fi
}
libu2f-host-devel_package() {
short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}