void-packages/srcpkgs/libnet/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
687 B
Bash

# Template file for 'libnet'
pkgname=libnet
version=1.2
revision=1
build_style=gnu-configure
short_desc="C library for portable packet creation and injection"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-only"
homepage="https://github.com/sam-github/libnet"
distfiles="https://github.com/sam-github/libnet/releases/download/v${version}/${pkgname}-${version}.tar.gz"
checksum=caa4868157d9e5f32e9c7eac9461efeff30cb28357f7f6bf07e73933fb4edaa7
libnet-devel_package() {
depends="${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin
vmove usr/include
vmove usr/share
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}