mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
54 lines
1.4 KiB
Bash
54 lines
1.4 KiB
Bash
# Maintainer: Samir Benmendil <samir.benmendil@gmail.com>
|
|
# Contributor: Felix Yan <felixonmars@gmail.com>
|
|
# Contributor: Justin Dray <justin@dray.be>
|
|
# Contributor: Alexander Rødseth <rodseth@gmail.com>
|
|
# Contributor: lang2 <wenzhi.liang@gmail.com>
|
|
|
|
pkgbase=python-pycparser
|
|
pkgname=(python3-pycparser python2-pycparser)
|
|
pkgver=2.10
|
|
pkgrel=5
|
|
pkgdesc='C parser and AST generator written in Python'
|
|
url='https://github.com/eliben/pycparser'
|
|
makedepends=('python3-ply' 'python2-ply' 'git')
|
|
arch=('any')
|
|
license=('BSD')
|
|
source=('https://github.com/eliben/pycparser/archive/release_v2.10.zip')
|
|
sha256sums=('1217244f882c330782f4762a1fb37cef21a929ce0123ac388e7e367c35ddbae3')
|
|
|
|
prepare() {
|
|
cp -r pycparser-release_v${pkgver}{,-py2}
|
|
}
|
|
|
|
build() {
|
|
cd pycparser-release_v${pkgver}
|
|
python3 setup.py build
|
|
|
|
cd pycparser
|
|
python3 _build_tables.py
|
|
|
|
cd "$srcdir/pycparser-release_v${pkgver}-py2"
|
|
python2 setup.py build
|
|
|
|
cd pycparser
|
|
python2 _build_tables.py
|
|
}
|
|
|
|
package_python3-pycparser() {
|
|
depends=('python3-ply')
|
|
|
|
cd pycparser-release_v${pkgver}
|
|
|
|
python3 setup.py install --root="$pkgdir" --optimize=1
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|
|
|
|
package_python2-pycparser() {
|
|
depends=('python2-ply')
|
|
|
|
cd pycparser-release_v${pkgver}-py2
|
|
|
|
python2 setup.py install --root="$pkgdir" --optimize=1
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|