Commit bf26deb1 authored by Jeff Huang's avatar Jeff Huang 🤔

[skip-ci] python-html2text: update to 2018.1.9

parent 914235f4
Pipeline #3393 skipped
# Contributions from Arch:
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Felix Yan <felixonmars@archlinux>
pkgbase=python-html2text
pkgname=('python3-html2text' 'python2-html2text')
pkgver=2018.1.9
pkgrel=1
pkgdesc="A HTML to markdown-structured text converter"
arch=('any')
url="https://pypi.python.org/pypi/html2text/"
license=('GPL3')
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-coverage' 'python2-coverage')
provides=('html2text')
replaces=('html2text')
source=($pkgname-$pkgver.tar.gz::https://github.com/Alir3z4/html2text/archive/$pkgver.tar.gz)
sha256sums=('9ad585bb7fda536ce231349e5046aefec7ccc2d111d11b859c9040edab94416b')
prepare() {
cp -a html2text-$pkgver{,-py2}
}
build() {
cd "${srcdir}"/html2text-$pkgver
python3 setup.py build
cd "${srcdir}"/html2text-$pkgver-py2
python2 setup.py build
}
package_python3-html2text() {
depends=('python3-setuptools')
cd "${srcdir}"/html2text-$pkgver
python3 setup.py install --root="${pkgdir}"
}
package_python2-html2text() {
depends=('python2-setuptools')
cd "${srcdir}"/html2text-$pkgver-py2
python2 setup.py install --root="${pkgdir}"
mv "$pkgdir/usr/bin/html2text"{,2}
}
# Maintainer: Ernesto Manríquez <alejandronova@gmail.com>
pkgname=python2-html2text
pkgver=2014.12.5
pkgrel=1
pkgdesc="Converts a page of HTML into clean, easy-to-read plain ASCII text."
arch=('x86_64')
url="http://www.aaronsw.com/2002/html2text"
license=('GPL3')
depends=('python2')
makedepends=('python-distribute')
source=("http://pypi.python.org/packages/source/h/html2text/html2text-$pkgver.tar.gz")
md5sums=('165c314c5957cc8cf847c9a8cac3e4d2')
package() {
cd "$srcdir/html2text-$pkgver"
python2 setup.py install --root="$pkgdir" --optimize=1
find "$pkgdir" -name '*.py' -print0 |xargs -0 \
sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,' \
-e 's,^#!/usr/bin/python$,#!/usr/bin/python2,'
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
install -m755 "$pkgdir/usr/bin/html2text" "$pkgdir/usr/bin/html2text_py"
rm "$pkgdir/usr/bin/html2text"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment