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

41 lines
1.2 KiB
Bash

# Template file for 'ifupdown'
pkgname=ifupdown
version=0.8.35
revision=1
wrksrc=ifupdown
build_style=gnu-makefile
make_use_env=yes
hostmakedepends="dpkg perl"
short_desc="High level tools to configure network interfaces"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://tracker.debian.org/pkg/ifupdown"
distfiles="http://http.debian.net/debian/pool/main/i/ifupdown/ifupdown_${version}.tar.xz"
checksum=d754426562a63b7d0cf06e8b00abe353fe9fd7ac5aabe3745f6d4e294ca233a8
make_dirs="/etc/network/interfaces.d 0755 root root
/etc/network/if-pre-up.d 0755 root root
/etc/network/if-up.d 0755 root root
/etc/network/if-down.d 0755 root root
/etc/network/if-post-down.d 0755 root root"
conf_files="/etc/network/interfaces"
post_install() {
vman interfaces.5
vman ifup.8
for _i in examples/* ; do
vsconf $_i
done
# Install the default interfaces file referenced from the man
# page
vmkdir etc/network
echo "source interfaces.d/*" > ${DESTDIR}/etc/network/interfaces
# Install the core services task, this enables us to promise
# that the network is up before the rest of the services start
vmkdir etc/runit/core-services
vinstall ${FILESDIR}/15-ifupdown.sh 0644 etc/runit/core-services
}