summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9fc9d887c2e4ee26884208eecf860c5d67bc4f59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

pkgname=python-sphinx-git
pkgver=r14026.f6e7878ec
pkgrel=1
arch=('any')
url='http://sphinx.pocoo.org/'
license=('BSD')
makedepends=('git'
  'python-setuptools'
  'python-docutils'
  'python-jinja'
  'python-pygments'
  'python-six'
)
checkdepends=(
  'python-pytest'
  'imagemagick'
  'texlive-latexextra'
  'python-snowballstemmer'
  'python-babel'
  'python-sphinx-alabaster-theme'
  'python-sphinx_rtd_theme'
)
source=("git+https://github.com/sphinx-doc/sphinx.git")
md5sums=('SKIP')

pkgver() {
  cd "${srcdir}/sphinx"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir"/sphinx
  make build
}

check() {
  cd "$srcdir"/sphinx
  make test
  rm -r tests
}

package() {
  pkgdesc='Python3 documentation generator'
  depends=('python-jinja' 'python-pygments' 'python-docutils' 'python-sphinx_rtd_theme' 'python-sphinx-alabaster-theme' 'python-babel' 
'python-snowballstemmer' 'python-six')
  optdepends=('texlive-latexextra: for generation of PDF documentation')
  provides=('python-sphinx')
  conflicts=('python-sphinx')

  cd sphinx
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 "$srcdir"/sphinx/LICENSE "$pkgdir"/usr/share/licenses/python-sphinx/LICENSE
}