void-packages/srcpkgs/olsrd/template
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: 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

28 lines
887 B
Bash

# Template file for 'olsrd'
pkgname=olsrd
version=0.9.7
revision=1
build_style=gnu-makefile
hostmakedepends="bison flex"
makedepends="gpsd"
short_desc="Daemon for Optimized Link State Routing Protocol from olsr.org"
maintainer="Daniel A. Maierhofer <git@damadmai.at>"
license="BSD-3-Clause"
homepage="http://www.olsr.org/"
distfiles="https://github.com/OLSR/olsrd/archive/v${version}.tar.gz"
checksum=9baf2e4993dbb53babf18eea9e81a2e92ce79686632711a16a5b4f7776e94451
conf_files="/etc/olsrd.conf"
do_install() {
vbin olsrd
vconf files/olsrd.conf.default.txt olsrd.conf
vsconf files/olsrd.conf.commotion olsrd.conf.commotion
vsconf files/olsrd.conf.default.lq olsrd.conf.default.lq
vsconf files/olsrd.conf.default.rfc olsrd.conf.default.rfc
vsconf files/olsrd.conf.funkfeuer olsrd.conf.funkfeuer
vlicense license.txt
vman files/olsrd.8.gz
vman files/olsrd.conf.5.gz
vsv olsrd
}