summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5776ec0a29620bed579e9eb2c059bc86cb76c325 (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
# Maintainer: dreieck

_pkgname=python2-antlr3-3.0.1
pkgname="${_pkgname}"
pkgdesc='ANTLR3 runtime for Python, version 3.0.1'
pkgver=3.0.1
pkgrel=3
arch=('any')
url="http://www.antlr3.org/"
license=('BSD')
depends=(
  'antlr3'
  'python2'
)
makedepends=(
  'python2-setuptools'
)
provides=("python2-antlr3=${pkgver}")
conflicts=("python2-antlr3")
source=(
  "https://www.antlr3.org/download/Python/antlr_python_runtime-${pkgver}.tar.gz"
)
sha256sums=(
  'a14c76c51961802a147d7b46ff3a6b1ce8c18901fb086bf50bb41a9e1cc5b125'
)

_cmd() {
  # Prints out what to be run to stdout, and then executes it.
  # The command and it's arguments is passed as argument(s).

  printf '%s' '> '; cat <<< "$@"
  "$@"
}

package() {
  cd "${srcdir}/antlr_python_runtime-${pkgver}"

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

  for _docfile in 'AUTHORS' 'PKG-INFO' 'README'; do
    _cmd install -D -m644 "${_docfile}" "${pkgdir}/usr/share/doc/${pkgname}/${_docfile}"
  done

  _cmd install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}