# Maintainer: UtG # Contributor: Matias Moreno pkgbase=python-unidecode pkgname=('python2-unidecode' 'python3-unidecode') _pkgname=Unidecode pkgver=0.04.19 pkgrel=1 pkgdesc='ASCII transliterations of Unicode text.' arch=('x86_64') license=('GPL') url="http://pypi.python.org/pypi/Unidecode/" makedepends=('python2-setuptools' 'python3-setuptools') options=('!emptydirs') source=(http://pypi.python.org/packages/source/U/$_pkgname/$_pkgname-$pkgver.tar.gz) sha256sums=('51477646a9169469e37e791b13ae65fcc75b7f7f570d0d3e514d077805c02e1e') prepare() { for d in python{,2,3}-unidecode; do cp -r Unidecode-${pkgver} $d done } build() { for d in python{,2,3}-unidecode; do pushd $d ${d%-*} setup.py build popd done } package_python2-unidecode() { cd python2-unidecode python2 setup.py install --root="${pkgdir}" --optimize='1' } package_python3-unidecode() { cd python3-unidecode python3 setup.py install --root="${pkgdir}" --optimize='1' }