PKGBUILD 1.3 KB
Newer Older
1 2 3 4 5 6 7 8
# Maintainer: Samir Benmendil <samir.benmendil@gmail.com>
# Contributor: Felix Yan <felixonmars@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Marcin "avalan" Falkiewicz <avalatron@gmail.com>
# Contributor: C Anthony Risinger <anthony@xtfx.me>

pkgbase=python-ply
pkgname=(python3-ply python2-ply)
Luca Giambonini's avatar
Luca Giambonini committed
9
pkgver=3.10
10
pkgrel=1
11 12 13 14 15
pkgdesc='Implementation of lex and yacc parsing tools'
arch=('any')
url='http://www.dabeaz.com/ply/'
license=('BSD')
makedepends=('python3-setuptools' 'python2-setuptools')
16 17
source=("${url}ply-$pkgver.tar.gz"
        LICENSE)
Luca Giambonini's avatar
Luca Giambonini committed
18
sha256sums=('96e94af7dd7031d8d6dd6e2a8e0de593b511c211a86e28a9c9621c275ac8bacb'
19
            '87c20dd0a774f4d4ff837b4f1555f7eb1ed1b8dc1e3223cd105e5c1e282d62bf')
20 21 22 23 24 25 26 27 28 29 30 31 32

prepare() {
  cp -r ${pkgbase#python-}-$pkgver{,-py2}
}

package_python3-ply() {
  depends=('python3')

  cd "${pkgbase#python-}-$pkgver"

  python3 setup.py install --root="$pkgdir"
  
  install -d "$pkgdir/usr/share/licenses/$pkgname"
33
  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
34 35 36 37 38 39 40 41 42 43
}

package_python2-ply() {
  depends=('python2')

  cd "${pkgbase#python-}-$pkgver-py2"

  python2 setup.py install --root="$pkgdir"
  
  install -d "$pkgdir/usr/share/licenses/$pkgname"
44
  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
45 46 47
}

# vim:set ts=2 sw=2 et: