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

27 lines
725 B
Bash

# Template file for 'libspnav'
pkgname=libspnav
version=0.2.3
revision=1
build_style=gnu-configure
configure_args="--disable-opt"
makedepends="libX11-devel"
short_desc="Open source alternative to 3DConnextion drivers"
maintainer="yopito <pierre.bourgin@free.fr>"
license="GPL-3"
homepage="http://spacenav.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/spacenav/${pkgname}-${version}.tar.gz"
checksum=7ae4d7bb7f6a5dda28b487891e01accc856311440f582299760dace6ee5f1f93
do_build() {
make CC="${CC}" AR="${AR}"
}
libspnav-devel_package() {
short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}