# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Thomas Jost <schnouki@schnouki.net>
# Contributor: Andrey Mikhaylenko <neithere@gmail.com>

pkgname=python-slugify
pkgver=8.0.4
pkgrel=3
pkgdesc='A Python slugify application that handles unicode'
arch=(any)
url=https://github.com/un33k/python-slugify
license=(MIT)
depends=(python-text-unidecode)
makedepends=(
  git
  python-setuptools
)
optdepends=('python-unidecode: Unidecode support')
_tag=f85f9488520148d5f6899b5639199882b605e30a
source=(git+https://github.com/un33k/python-slugify.git#tag=${_tag})
sha256sums=(SKIP)

pkgver() {
  cd python-slugify

  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd python-slugify

  python setup.py build
}

package() {
  cd python-slugify

  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/python-slugify/
}

# vim: ts=2 sw=2 et:
