# $Id: PKGBUILD 131300 2015-04-13 16:17:44Z kkeen $
# Maintainer: Kyle Keen <keenerd@gmail.com>
pkgname=arch-wiki-lite
pkgver=20150219
_codever=20150413
pkgrel=2
pkgdesc="The wiki without html.  1/9 as big, easily searched and viewable on console."
arch=('any')
url="http://kmkeen.com/arch-wiki-lite/"
_watch="https://www.archlinux.org/packages/community/any/arch-wiki-docs/"
license=('GPL' 'FDL')
depends=('bash' 'gzip')
makedepends=('python' 'arch-wiki-docs')
optdepends=('arch-wiki-docs: for wiki-search-html')
source=("http://kmkeen.com/$pkgname/$pkgname-$_codever.tar.gz")
md5sums=('312239f18c883680c3eb25702893a4ec')

build() {
  cd "$srcdir/$pkgname"
  LC_ALL=en_US.UTF-8 python3 wiki_lite.py
}

package() {
  cd "$srcdir/$pkgname"
  install -d "$pkgdir/usr/share/doc/arch-wiki/text/"
  install -m 0644 wiki/* "$pkgdir/usr/share/doc/arch-wiki/text/"
  install -Dm 0755 wiki-search      "$pkgdir/usr/bin/wiki-search"
  install -Dm 0755 wiki-search-html "$pkgdir/usr/bin/wiki-search-html"
}

