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

23 lines
679 B
Bash

# Template file for 'otpw'
pkgname=otpw
version=1.5
revision=5
conf_files="/etc/pam.d/ssh-otpw"
makedepends="pam-devel"
short_desc="A one-time password login package"
maintainer="Duncan Overbruck <mail@duncano.de>"
license="GPL-3"
homepage="http://www.cl.cam.ac.uk/~mgk25/otpw.html"
distfiles="https://www.cl.cam.ac.uk/%7Emgk25/download/otpw-${version}.tar.gz"
checksum=98aca38a61c7713677b96f24426ca7053480c0fd077d91b1e99bc9f92ccb832a
do_build() {
make CC=$CC LD=$LD CFLAGS="$CFLAGS -fPIC" LDFLAGS="$LDFLAGS" ${makejobs}
}
do_install() {
vinstall pam_otpw.so 755 /usr/lib/security
vman pam_otpw.8
vinstall $FILESDIR/ssh-otpw 644 /etc/pam.d
vbin otpw-gen
vman otpw-gen.1
}