void-packages/srcpkgs/cdb/template
Đoàn Trần Công Danh c987560802 srcpkgs/c*: 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
640 B
Bash

# Template file for 'cdb'
pkgname=cdb
version=0.75
revision=5
build_style=gnu-makefile
short_desc="Constant database utilities"
maintainer="Lain <lain@waifu.club>"
license="Public Domain"
homepage="http://cr.yp.to/cdb.html"
distfiles="http://cr.yp.to/cdb/cdb-${version}.tar.gz"
checksum="1919577799a50c080a8a05a1cbfa5fa7e7abc823d8d7df2eeb181e624b7952c5"
alternatives="
cdb:cdbdump:/usr/bin/cdb-dump
cdb:cdbget:/usr/bin/cdb-get
cdb:cdbmake:/usr/bin/cdb-make
cdb:cdbstats:/usr/bin/cdb-stats
"
do_configure() {
echo /usr >conf-home
}
do_install() {
for f in dump get make stats test make-12 make-sv; do
vbin cdb${f} cdb-${f}
done
}