void-packages/srcpkgs/python-M2Crypto/template
2018-04-14 22:09:29 +02:00

34 lines
1.1 KiB
Bash

# Template file for 'python-M2Crypto'
pkgname=python-M2Crypto
version=0.29.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 <abc@pompel.me>"
license="MIT"
homepage="https://gitlab.com/m2crypto/m2crypto/"
distfiles="${PYPI_SITE}/M/M2Crypto/M2Crypto-${version}.tar.gz"
checksum=a0fea2c5ab913e42864d1ccbaee5878c23886368b606e923609fda4ce37d26c0
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
}
}