void-packages/srcpkgs/ippusbxd/template
Đoàn Trần Công Danh 986c0a7d5e srcpkgs/i*: 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

25 lines
799 B
Bash

# Template file for 'ippusbxd'
pkgname=ippusbxd
version=1.34
revision=2
build_wrksrc=src
build_style=cmake
make_cmd=make
hostmakedepends="pkg-config"
makedepends="libusb-devel avahi-libs-devel libxml2-devel cups-devel"
short_desc="Internet Printing Protocol (IPP) over USB driver"
maintainer="Cameron Nemo <cnemo@tutanota.com>"
license="Apache-2.0"
homepage="https://github.com/OpenPrinting/ippusbxd"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=996a572c8f6d1426a58ad3b95c21fea7f5b64d5db34a825c543d7869b3c77891
conf_files="/etc/apparmor.d/usr.sbin.ippusbxd"
export CMAKE_GENERATOR="Unix Makefiles"
do_install() {
vbin build/ippusbxd
vman ../doc/ippusbxd.8
vinstall apparmor/usr.sbin.ippusbxd 0644 etc/apparmor.d
vinstall ${FILESDIR}/55-ippusbxd.rules 0644 usr/lib/udev/rules.d
}