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

33 lines
959 B
Bash

# Template file for 'libu2f-server'
pkgname=libu2f-server
version=1.1.0
revision=9
wrksrc="${pkgname}-${pkgname}-${version}"
build_style=gnu-configure
hostmakedepends="automake libtool pkg-config gengetopt check"
makedepends="json-c-devel hidapi-devel openssl-devel check-devel"
short_desc="Yubico Universal 2nd Factor (U2F) Server C Library"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="BSD"
homepage="https://developers.yubico.com/libu2f-server/"
distfiles="https://github.com/Yubico/libu2f-server/archive/libu2f-server-${version}.tar.gz"
checksum=6551109e692c9c4fea61e99f1cd8377e8e54e3033e421cc191da6d673311c860
pre_configure() {
autoreconf -fi
}
post_install() {
vlicense COPYING LICENSE
}
libu2f-server-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
}
}