# $Id: PKGBUILD 142591 2015-10-01 16:09:41Z fyan $
# Maintainer:
# Contributor: xantares

pkgbase=python-sphinx-alabaster-theme
pkgname=(python-sphinx-alabaster-theme python2-sphinx-alabaster-theme)
pkgver=0.7.6
pkgrel=2
arch=(any)
pkgdesc="Modified Kr Sphinx doc theme"
url='https://github.com/bitprophet/alabaster'
license=(BSD)
makedepends=(python-setuptools python2-setuptools)
source=("https://github.com/bitprophet/alabaster/archive/${pkgver}.tar.gz")
md5sums=('940d47184c4d67d9e1943ba2e5b15a65')

build() {
  cp -r ${srcdir}/alabaster-${pkgver} ${srcdir}/alabaster-${pkgver}-py2
  
  cd "$srcdir"/alabaster-${pkgver}
  python setup.py build

  cd "$srcdir"/alabaster-${pkgver}-py2
  python2 setup.py build
}

package_python-sphinx-alabaster-theme() {
  cd "$srcdir"/alabaster-${pkgver}
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

package_python2-sphinx-alabaster-theme() {
  cd "$srcdir"/alabaster-${pkgver}-py2 
  python2 setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

