mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 23:30:04 +02:00
83 lines
1.9 KiB
Bash
83 lines
1.9 KiB
Bash
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
|
|
}
|