mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 13:20:08 +02:00
pythonzeroconf: new recipe
This commit is contained in:
78
dev-python/pythonzeroconf/pythonzeroconf-0.28.8.recipe
Normal file
78
dev-python/pythonzeroconf/pythonzeroconf-0.28.8.recipe
Normal file
@@ -0,0 +1,78 @@
|
||||
SUMMARY="A Python module for Multicast DNS Service Discovery"
|
||||
DESCRIPTION="This is fork of pyzeroconf, Multicast DNS Service Discovery for Python."
|
||||
HOMEPAGE="https://github.com/jstasiak/python-zeroconf/"
|
||||
COPYRIGHT="2003 Paul Scott-Murphy
|
||||
2014 William McBrine"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/jstasiak/python-zeroconf/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5272431bf88611c722119504504b86738f9366f518781deb24e520e382d1f337"
|
||||
SOURCE_FILENAME="zeroconf-$portVersion.tar.gz"
|
||||
SOURCE_DIR="python-zeroconf-$portVersion"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
pythonzeroconf = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python3 python38 python39)
|
||||
PYTHON_VERSIONS=(3.7 3.8 3.9)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[i]}
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
pythonzeroconf_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
ifaddr_$pythonPackage
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
BUILD()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[i]}
|
||||
|
||||
rm -rf "$sourceDir"-$pythonPackage
|
||||
cp -a "$sourceDir" "$sourceDir"-$pythonPackage
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
$python setup.py build
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[i]}
|
||||
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages
|
||||
export PYTHONPATH=$installLocation
|
||||
mkdir -p "$installLocation"
|
||||
$python setup.py install \
|
||||
--root=/ --prefix="$prefix" --skip-build
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user