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

29 lines
853 B
Bash

# Template file for 'libsigrokdecode'
pkgname=libsigrokdecode
version=0.5.3
revision=3
build_style=gnu-configure
hostmakedepends="pkg-config python3 autoconf automake"
makedepends="glib-devel python3-devel"
checkdepends="check-devel"
short_desc="C library provides basic API for running sigrok protocol decoders"
maintainer="lemmi <lemmi@nerd2nerd.org>"
license="GPL-3.0-or-later"
homepage="https://sigrok.org/"
distfiles="https://sigrok.org/download/source/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=c50814aa6743cd8c4e88c84a0cdd8889d883c3be122289be90c63d7d67883fc0
pre_configure() {
autoreconf
}
libsigrokdecode-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}