# Template file for 'python-M2Crypto' pkgname=python-M2Crypto version=0.30.0 revision=2 wrksrc="M2Crypto-${version}" build_style=python-module pycompile_module="M2Crypto" hostmakedepends="python-setuptools python3-setuptools swig libressl-devel" makedepends="libressl-devel python-devel python3-devel" depends="python-typing" short_desc="Python2 crypto and SSL toolkit" maintainer="Andrea Brancaleoni " license="MIT" homepage="https://gitlab.com/m2crypto/m2crypto/" distfiles="${PYPI_SITE}/M/M2Crypto/M2Crypto-${version}.tar.gz" checksum=0faf8588cc472061ed90ef3dd2f1c11fc3d61d8ac368853ff05fa23a768ee893 pre_configure() { sed -i 's/OPENSSL_VERSION_NUMBER < 0x10100000L/OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)/g' SWIG/*.i sed -i 's/OPENSSL_VERSION_NUMBER >= 0x10100000L/OPENSSL_VERSION_NUMBER >= 0x10100000L \&\& !defined(LIBRESSL_VERSION_NUMBER)/g' SWIG/*.i } post_install() { vlicense LICENCE } python3-M2Crypto_package() { pycompile_module="M2Crypto" short_desc="${short_desc/Python2/Python3}" pkg_install() { vmove usr/lib/python3* vlicense LICENCE } }