void-packages/srcpkgs/argon2/template
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword is kept at -Np0

```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

34 lines
913 B
Bash

# Template file for 'argon2'
pkgname=argon2
version=20190702
revision=3
wrksrc="phc-winner-argon2-${version}"
build_style=gnu-makefile
make_use_env=yes
make_build_args="OPTTARGET=none"
make_check_args="OPTTARGET=none"
make_check_target=test
short_desc="Password hashing function"
maintainer="Piraty <piraty1@inbox.ru>"
license="CC0-1.0, Apache-2.0"
homepage="https://github.com/P-H-C/phc-winner-argon2"
distfiles="https://github.com/P-H-C/phc-winner-argon2/archive/${version}.tar.gz"
checksum=daf972a89577f8772602bf2eb38b6a3dd3d922bf5724d45e7f9589b5e830442c
libargon2_package() {
short_desc="Password hashing library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
libargon2-devel_package() {
short_desc="Password hashing library - development files"
depends="libargon2>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}