mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 23:30:04 +02:00
Unrardll: new recipe (#4656)
This commit is contained in:
62
dev-python/unrardll/unrardll-0.1.4.recipe
Normal file
62
dev-python/unrardll/unrardll-0.1.4.recipe
Normal file
@@ -0,0 +1,62 @@
|
||||
SUMMARY="Python wrapper for the UnRAR DLL"
|
||||
DESCRIPTION="Wrap the Unrar DLL to enable unraring of files in python"
|
||||
HOMEPAGE="https://github.com/kovidgoyal/unrardll
|
||||
https://pypi.org/project/unrardll/"
|
||||
COPYRIGHT="2017 Kovid Goyal"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/kovidgoyal/unrardll/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="88c23a76492cf0d4aef5861947064698984c930294776dc66e9c46c2004ff0a2"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
lib:libunrar
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python36 python3)
|
||||
PYTHON_VERSIONS=(2.7 3.6 3.7)
|
||||
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\n\
|
||||
devel:libunrar"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion\n\
|
||||
cmd:gcc$secondaryArchSuffix"
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user