mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
update 3.9.9 (2020-11-02) to 3.10.1 (2021-02-09) changelog: https://raw.githubusercontent.com/Legrandin/pycryptodome/master/Changelog.rst
40 lines
1.3 KiB
Makefile
40 lines
1.3 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
PKG_NAME="pycryptodome"
|
|
PKG_VERSION="3.10.1"
|
|
PKG_SHA256="11f07d59a0e35a477ce8d73b90047fa11b7e3af4ebbac23745858d0f37e4f7c2"
|
|
PKG_LICENSE="BSD"
|
|
PKG_SITE="https://pypi.org/project/pycryptodome"
|
|
PKG_URL="https://github.com/Legrandin/${PKG_NAME}/archive/v${PKG_VERSION}.tar.gz"
|
|
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
|
|
PKG_LONGDESC="PyCryptodome is a self-contained Python package of low-level cryptographic primitives."
|
|
PKG_TOOLCHAIN="manual"
|
|
|
|
pre_configure_target() {
|
|
cd ${PKG_BUILD}
|
|
rm -rf .${TARGET_NAME}
|
|
|
|
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
|
|
export LDSHARED="${CC} -shared"
|
|
}
|
|
|
|
make_target() {
|
|
python3 setup.py build --cross-compile
|
|
}
|
|
|
|
makeinstall_target() {
|
|
python3 setup.py install --root=${INSTALL} --prefix=/usr
|
|
|
|
# Remove SelfTest bloat
|
|
find ${INSTALL} -type d -name SelfTest -exec rm -fr "{}" \; 2>/dev/null || true
|
|
find ${INSTALL} -name SOURCES.txt -exec sed -i "/\/SelfTest\//d;" "{}" \;
|
|
|
|
# Create Cryptodome as an alternative namespace to Crypto (Kodi addons may use either)
|
|
ln -sf /usr/lib/${PKG_PYTHON_VERSION}/site-packages/Crypto ${INSTALL}/usr/lib/${PKG_PYTHON_VERSION}/site-packages/Cryptodome
|
|
}
|
|
|
|
post_makeinstall_target() {
|
|
python_remove_source
|
|
}
|