void-packages/srcpkgs/python-M2Crypto/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par 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

30 lines
820 B
Bash

# Template file for 'python-M2Crypto'
pkgname=python-M2Crypto
version=0.35.2
revision=6
wrksrc="M2Crypto-${version}"
build_style=python-module
pycompile_module="M2Crypto"
hostmakedepends="python-setuptools python3-setuptools swig openssl-devel"
makedepends="openssl-devel python-devel python3-devel"
depends="python-typing"
short_desc="Python2 crypto and SSL toolkit"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://gitlab.com/m2crypto/m2crypto/"
distfiles="${PYPI_SITE}/M/M2Crypto/M2Crypto-${version}.tar.gz"
checksum=4c6ad45ffb88670c590233683074f2440d96aaccb05b831371869fc387cbd127
post_install() {
vlicense LICENCE
}
python3-M2Crypto_package() {
pycompile_module="M2Crypto"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
vlicense LICENCE
}
}