void-packages/srcpkgs/u2f-hidraw-policy/template
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: 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
586 B
Bash

# Template file for 'u2f-hidraw-policy'
pkgname=u2f-hidraw-policy
version=1.0.2
revision=2
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="eudev-libudev-devel"
short_desc="Udev helper and rule to identify U2F tokens"
maintainer="Toyam Cox <Vaelatern@gmail.com>"
license="LGPL-2.0-or-later"
homepage="https://github.com/amluto/u2f-hidraw-policy"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=50e327a9df3dd3db3b292af41fb119cc4c8d9bc29abddfb442e972053bf5e6d1
post_install() {
vmkdir usr
cp -r "${DESTDIR}/lib" "${DESTDIR}/usr"
rm -rf "${DESTDIR}/lib"
}