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

24 lines
730 B
Bash

# Template file for 'libusb'
pkgname=libusb
version=1.0.24
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="eudev-libudev-devel"
short_desc="Library which allows userspace access to USB devices"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://libusb.info"
distfiles="https://github.com/libusb/libusb/releases/download/v${version}/libusb-${version}.tar.bz2"
checksum=7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a
libusb-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
vmove /usr/include
vmove /usr/lib/pkgconfig
vmove "/usr/lib/*.a"
vmove "/usr/lib/*.so"
}
}