void-packages/srcpkgs/python-crypto/template

41 lines
1.2 KiB
Bash

# Template file for 'python-crypto'
pkgname=python-crypto
version=2.6.1
revision=8
wrksrc="pycrypto-${version}"
build_style=python-module
hostmakedepends="python-devel python3-devel"
makedepends="${hostmakedepends} gmp-devel"
depends="python"
pycompile_module="Crypto"
short_desc="The Python Cryptography Toolkit (Python2)"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="https://www.dlitz.net/software/pycrypto/"
license="PSF, Public domain"
distfiles="https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-$version.tar.gz"
checksum=f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c
pre_build() {
if [ "$CROSS_BUILD" ]; then
sed -e "s|'/usr/include/'|''|g" -i setup.py
CC= CFLAGS= ./configure ${configure_args} --host=${XBPS_CROSS_TRIPLET}
else
CC="$CC" CFLAGS="$CFLAGS" ./configure ${configure_args}
fi
}
python3-crypto_package() {
depends="python3"
pycompile_module="Crypto"
replaces="python3.4-crypto>=0"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3*
}
}
python3.4-crypto_package() {
build_style=meta
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
depends="python3-crypto>=${version}_${revision}"
}