# vim: syn=sh ft=sh et sw=2 sts=2 ts=2 tw=0:
#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>
# Modified and included in Slint by Didier Saier <didier~at~slint~dot~fr>
pkgname=Pygments
pkgver=2.2.0
pkgrel=1slint
source=(http://pypi.python.org/packages/source/P/${pkgname}/${pkgname}-${pkgver}.tar.gz)
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "license" "changes")
url=http://pygments.org

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (syntax highlighting package written in Python)"
"It is a generic syntax highlighter for general use in all kinds of"
"software such as forum systems, wikis or other applications that need"
"to prettify source code."
"Highlights are:"
" * A wide range of common languages and markup formats is supported."
" * Special attention is paid to details, increasing quality."
" * Support for new languages and formats are added easily."
" * output formats: HTML, LaTeX, RTF, SVG and ANSI sequences."
" * It is usable as a command-line tool and as a library."
)

build() {
  cd $SRC/$pkgname-$pkgver || return 1
  python setup.py install --prefix=/usr --root=$PKG || return 1
  python3 setup.py install --prefix=/usr --root=$PKG || return 1
  mkdir -p $PKG/usr/man/man1 || return 1
  # Adapting to Slackware's directory layout
  sed "s,share/doc/python-pygments,doc/$pkgname-$pkgver," doc/pygmentize.1 > $PKG/usr/man/man1/pygmentize.1 || return 1
}
