diff --git a/python-pyaudio/PKGBUILD b/python-pyaudio/PKGBUILD new file mode 100644 index 000000000..b3f0aaf3d --- /dev/null +++ b/python-pyaudio/PKGBUILD @@ -0,0 +1,43 @@ +# Contributions from Arch: +# Contributor: Balló György + +_pkgbase=PyAudio +pkgbase=python-pyaudio +pkgname=('python3-pyaudio' 'python2-pyaudio') +pkgver=0.2.11 +pkgrel=1 +pkgdesc="Python bindings for PortAudio" +arch=('x86_64') +url="https://people.csail.mit.edu/hubert/pyaudio/" +license=('MIT') +depends=('portaudio' 'python3' 'python2') +source=("$pkgbase-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/P/$_pkgbase/$_pkgbase-$pkgver.tar.gz") +sha256sums=('93bfde30e0b64e63a46f2fd77e85c41fd51182a4a3413d9edfaf9ffaa26efb74') + +prepare() { + cp -a $_pkgbase-$pkgver{,-python2} +} + +build() { + cd $_pkgbase-$pkgver + python3 setup.py build + + cd ../$_pkgbase-$pkgver-python2 + python2 setup.py build +} + +package_python3-pyaudio() { + depends=('portaudio' 'python3') + + cd $_pkgbase-$pkgver + python3 setup.py install --root "$pkgdir" --optimize=1 + install -Dm644 README "$pkgdir/usr/share/licenses/$pkgname/README" +} + +package_python2-pyaudio() { + depends=('portaudio' 'python2') + + cd $_pkgbase-$pkgver-python2 + python2 setup.py install --root "$pkgdir" --optimize=1 + install -Dm644 README "$pkgdir/usr/share/licenses/$pkgname/README" +}