html2text: bump version.

keep 2019.8.11 for python 2.7.
This commit is contained in:
Jerome Duval
2019-10-22 20:42:10 +02:00
parent 2ec9e527b6
commit a178a46a77
2 changed files with 53 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ COPYRIGHT="2004-2008 Aaron Swartz"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/Alir3z4/html2text/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="21c0237fae4f640eef53343a2965f44bfd907f0e1b956cd1171fb3884541767a"
CHECKSUM_SHA256="22a85d1634cfb198f569980b3095d560021860e19c809a5e9643129595ce8bd4"
ARCHITECTURES="any"
@@ -25,8 +25,8 @@ BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python python3)
PYTHON_VERSIONS=(2.7 3.6)
PYTHON_PACKAGES=(python36 python3)
PYTHON_VERSIONS=(3.6 3.7)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
@@ -43,14 +43,11 @@ BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
PROVIDES_python="$PROVIDES_python
cmd:html2text
"
REPLACES_python="
python_html2text
PROVIDES_python36="$PROVIDES_python36
cmd:html2text3.6
"
PROVIDES_python3="$PROVIDES_python3
cmd:html2text3
cmd:html2text3.7
"
INSTALL()
@@ -67,9 +64,7 @@ INSTALL()
$python setup.py build install \
--root=/ --prefix=$prefix
if [ $pythonPackage != python ]; then
mv $binDir/html2text $binDir/html2text3
fi
mv $binDir/html2text $binDir/html2text$pythonVersion
packageEntries $pythonPackage \
$prefix/lib/python* \
$binDir

View File

@@ -0,0 +1,46 @@
SUMMARY="Convert HTML to Markdown-formatted text"
DESCRIPTION="
html2text is a Python script that converts a page of HTML into clean,
easy-to-read plain ASCII text. Better yet, that ASCII also happens to be
valid Markdown (a text-to-HTML format)."
HOMEPAGE="https://github.com/html2text/html2text.py
https://github.com/Alir3z4/html2text
https://pypi.python.org/pypi/html2text"
COPYRIGHT="2004-2008 Aaron Swartz"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/Alir3z4/html2text/archive/$portVersion.tar.gz"
SOURCE_DIR="html2text-$portVersion"
CHECKSUM_SHA256="aeffe2b403ddf242f43aba6b91b77791a489b32e6e8fa108f7963d11cb85c862"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
cmd:html2text
"
REQUIRES="
haiku
cmd:python2.7
"
BUILD_REQUIRES="
haiku_devel
setuptools_python
"
BUILD_PREREQUIRES="
cmd:python2.7
"
INSTALL()
{
pythonVersion=2.7
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
}