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

38 lines
1.3 KiB
Bash

# Template file for 'libfprint'
pkgname=libfprint
version=1.90.7
revision=1
wrksrc=libfprint-v$version
build_style=meson
build_helper=gir
configure_args="-Dudev_rules=false -Dx11-examples=false -Dgtk-examples=false -Ddoc=false"
hostmakedepends="pkg-config glib-devel"
makedepends="libusb-devel nss-devel glib-devel gdk-pixbuf-devel pixman-devel
libgusb-devel libglib-devel"
depends="libfprint-udev-rules>=${version}_${revision}"
short_desc="Support for consumer fingerprint reader devices"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="http://www.freedesktop.org/wiki/Software/fprint/"
changelog="https://gitlab.freedesktop.org/libfprint/libfprint/raw/master/NEWS"
distfiles="https://gitlab.freedesktop.org/libfprint/libfprint/-/archive/v$version/libfprint-v$version.tar.bz2"
checksum=d11acf183820812fd6a8cd808d58bbf197554bcc0f9119d4c873092ecd94ee29
libfprint-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}
libfprint-udev-rules_package() {
short_desc+=" - udev rules"
conflicts="libfprint<=1.0_1"
pkg_install() {
vmkdir usr/lib/udev/rules.d
vinstall $FILESDIR/60-fprint-autosuspend.rules 644 usr/lib/udev/rules.d
}
}