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

19 lines
568 B
Bash

# Template file for 'cdm'
pkgname=cdm
version=0.7
revision=3
depends="dialog xinit kbd xdpyinfo"
short_desc="Console Display Manager"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-2.0-or-later"
homepage="https://github.com/evertiro/cdm"
distfiles="https://github.com/evertiro/cdm/archive/${version}.tar.gz"
checksum=530042165ce65cdff3ec62ba9f077d0e8c6744c13f5d449d84fe2506a79d2e56
do_install() {
sed -i 's| /| $PKGDESTDIR/|g' install.sh
PKGDESTDIR="$PKGDESTDIR" ./install.sh
vmkdir etc/profile.d
vinstall src/profile.sh 755 etc/profile.d cdm.sh
}