summaryrefslogtreecommitdiff
path: root/python-sphinxcontrib-programoutput/PKGBUILD
blob: 6081fa921ca56504f534a7e88f20d6b30cac4e29 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
# Contributor: Josh VanderLinden <arch@cloudlery.com>
pkgbase=python-sphinxcontrib-programoutput
pkgname=(python2-sphinxcontrib-programoutput python-sphinxcontrib-programoutput)
_pkgname=sphinxcontrib-programoutput
pkgver=0.11
pkgrel='2'
pkgdesc="Sphinx extension to include program output"
arch=('any')
url="https://bitbucket.org/birkenfeld/sphinx-contrib"
license=('BSD')
_deppy2=(
  'python2>=2.7'
  'python2<2.8'
)
_deppy=(
  'python>=3.7'
  'python<3.8'
)
_depends=(
  'python')
_makedepends=(
  'python-setuptools')
provides=('sphinxcontrib-programoutput')
options=(!emptydirs)
source=(
  "https://pypi.python.org/packages/source/s/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
)
source=(https://pypi.python.org/packages/25/34/fd1b61d3fe9ea705dff169d55426bf23d8be0f7b1976d17e79fbcc16e7d9/${_pkgname}-${pkgver}.tar.gz)
sha512sums=('4aa655f8632093035de986fa31291f95e95c4c0f4d1458bb8c8cc077cca73d579b16a8bf103d7b34faafb2171c617c40200008d89186f8ed37a812459f0376cf')
makedepends=(
  "${_deppy[@]}"
  "${_deppy2[@]}"
  "${_makedepends[@]}"
  "${_makedepends[@]/python/python2}"
  "${_depends[@]}"
  "${_depends[@]/python/python2}"
)

prepare() {
  cp -r "${srcdir}/${_pkgname}-${pkgver}" "${srcdir}/py2-${_pkgname}-${pkgver}"
  mv "${srcdir}/${_pkgname}-${pkgver}" "${srcdir}/py-${_pkgname}-${pkgver}"
}

build() {
  cd "${srcdir}/py2-${_pkgname}-${pkgver}"
  python2 setup.py build

  cd "${srcdir}/py-${_pkgname}-${pkgver}"
  python setup.py build
}

package_python2-sphinxcontrib-programoutput() {
  depends=(
    "${_deppy2[@]}"
    "${_depends[@]/python/python2}"
  )
  cd "${srcdir}/py2-${_pkgname}-${pkgver}"

  python2 setup.py install --root="${pkgdir}/" --optimize=1

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

package_python-sphinxcontrib-programoutput() {
  depends=(
    "${_deppy2[@]}"
    "${_depends[@]}"
  )
  cd "${srcdir}/py-${_pkgname}-${pkgver}"

  python setup.py install --root="${pkgdir}/" --optimize=1

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