Files
haikuports/dev-python/bcrypt/bcrypt-3.2.0.recipe
2022-09-15 12:31:25 +02:00

72 lines
1.8 KiB
Bash

SUMMARY="Modern password hashing"
DESCRIPTION="Bcrypt provides good password hashing for your software and your \
servers."
HOMEPAGE="https://pypi.python.org/pypi/bcrypt"
COPYRIGHT="2013 Donald Stufft"
LICENSE="Apache v2"
REVISION="5"
SOURCE_URI="https://pypi.io/packages/source/b/bcrypt/bcrypt-$portVersion.tar.gz"
CHECKSUM_SHA256="5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
gcc$secondaryArchSuffix
"
PYTHON_PACKAGES=(python3 python38 python39 python310)
PYTHON_VERSIONS=(3.7 3.8 3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cffi${secondaryArchSuffix}_$pythonPackage\n\
cmd:python$pythonVersion\
\""
if [ "$targetArchitecture" = "x86_gcc2" ]; then
eval "PROVIDES_${pythonPackage}+=\"\n\
bcrypt_$pythonPackage = $portVersion\
\""
fi
BUILD_REQUIRES="$BUILD_REQUIRES
cffi${secondaryArchSuffix}_$pythonPackage
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
export CFLAGS="-D_BSD_SOURCE"
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}