From 8b3d7c780992e12e54e9e39433097256de6b70ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Mon, 18 Feb 2019 19:44:47 +0100 Subject: [PATCH] Python example --- generic/generic_python-1.2.3.recipe | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 generic/generic_python-1.2.3.recipe diff --git a/generic/generic_python-1.2.3.recipe b/generic/generic_python-1.2.3.recipe new file mode 100644 index 00000000..5018ad6b --- /dev/null +++ b/generic/generic_python-1.2.3.recipe @@ -0,0 +1,68 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 80 characters and use \ +a backslash to wrap the line." +HOMEPAGE="https://homepage/of/projectx.org" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="$portVersionedName" +PATCHES="projectx-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +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\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku\n\ + cmd:python$pythonVersion\ + \"" +BUILD_REQUIRES="$BUILD_REQUIRES + 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 + mkdir -p $installLocation + rm -rf build + $python setup.py build install \ + --root=/ --prefix=$prefix + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +}