void-packages/srcpkgs/python-M2Crypto/template

26 lines
915 B
Bash

# Template file for 'python-M2Crypto'
pkgname=python-M2Crypto
version=0.29.0
revision=1
wrksrc="M2Crypto-${version}"
build_style=python2-module
pycompile_module="M2Crypto"
hostmakedepends="python-setuptools swig libressl-devel"
makedepends="libressl-devel python-devel"
depends="python-typing"
short_desc="Python 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
}