mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 16:50:06 +02:00
asn1crypto: new recipe.
This commit is contained in:
82
dev-python/asn1crypto/asn1crypto-0.24.0.recipe
Normal file
82
dev-python/asn1crypto/asn1crypto-0.24.0.recipe
Normal file
@@ -0,0 +1,82 @@
|
||||
SUMMARY="A Python ASN.1 library with a pythonic API"
|
||||
DESCRIPTION="asn1crypto is a fast, pure Python library for parsing and \
|
||||
serializing ASN.1 structures."
|
||||
HOMEPAGE="https://github.com/wbond/asn1crypto"
|
||||
COPYRIGHT="2015-2018 Will Bond"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/wbond/asn1crypto/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d2a82bb3c29e1abcb376b59679510b58dd796c813f8983f2db9b45e9ab228190"
|
||||
SOURCE_FILENAME="asn1crypto-$portVersion.tar.gz"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
asn1crypto = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
setuptools_python
|
||||
setuptools_python3
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:python
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python3)
|
||||
PYTHON_VERSIONS=(2.7 3.6)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
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"
|
||||
rm -rf build
|
||||
mkdir -p "$installLocation"
|
||||
$python setup.py build install --root=/ --prefix="$prefix"
|
||||
|
||||
install -m 755 -d "$dataDir"/licenses
|
||||
install -m 644 -T LICENSE "$dataDir"/licenses/asn1crypto
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$dataDir" \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
|
||||
install -m 755 -d "$dataDir"/licenses "$docDir"/docs
|
||||
install -m 644 -T LICENSE "$dataDir"/licenses/asn1crypto
|
||||
install -m 644 -t "$docDir" changelog.md readme.md
|
||||
install -m 644 -t "$docDir"/docs docs/*
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
python=python$pythonVersion
|
||||
$python run.py tests
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user