# SliTaz package receipt.
PACKAGE="python-html2text"
VERSION="2019.8.11"
CATEGORY="network"
SHORT_DESC="Convert HTML into clean, easy-to-read markdown-formatted text."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL3"
WEB_SITE="https://pypi.org/project/html2text/"
REPOLOGY="python:html2text"
SOURCE="html2text"
TARBALL="$SOURCE-$VERSION.tar.gz"
WGET_URL="https://files.pythonhosted.org/packages/source/${SOURCE:0:1}/$SOURCE/$TARBALL"
DEPENDS="python"
BUILD_DEPENDS="python-dev python-distribute python-setuptools"
current_version()
{
wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
}
# Rules to configure and make the package.
compile_rules()
{
python setup.py install --root="$DESTDIR" --optimize=1
}
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
mkdir -p $fs/usr
mkdir -p $install/usr/share
cp -a $install/usr/lib $fs/usr
cp -a $install/usr/bin $fs/usr
# 2019.8.11 not available
# cp -a $src/docs $install/usr/share/doc
cp -a $src/COP* $install/usr/share/doc
cp -a $src/RE* $install/usr/share/doc
}