summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorHåvard Pettersson2018-04-02 15:47:05 +0200
committerHåvard Pettersson2018-04-02 15:47:05 +0200
commit63914cb69232a5d7e21b1d88c55a0f18880a6bba (patch)
treea2ea97b711798b7b2f4f9d35df99246ae44327cb /PKGBUILD
downloadaur-python-sounddevice-git.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b52585ba64fc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Håvard Pettersson <mail@haavard.me>
+# Contributor: robertfoster
+
+_pkgname=sounddevice
+pkgbase=python-$_pkgname-git
+pkgname=(python-$_pkgname-git python2-$_pkgname-git)
+pkgver=0.3.10.2.g5eb0041
+pkgrel=1
+pkgdesc='Play and Record Sound with Python'
+url='http://python-sounddevice.rtfd.io/'
+license=('MIT')
+arch=('any')
+depends=(portaudio python python-cffi)
+makedepends=(python-setuptools python2-setuptools python2-cffi)
+optdepends=('python-numpy: to play back and record NumPy arrays')
+conflicts=(python-sounddevice)
+source=("${pkgname[0]}::git+https://github.com/spatialaudio/python-sounddevice.git")
+sha256sums=(SKIP)
+
+pkgver() {
+ cd ${pkgname[0]}
+ git describe --tags --long | sed 's/-/./g'
+}
+
+prepare() {
+ cp -a ${pkgname[0]} ${pkgname[1]}
+}
+
+build(){
+ cd "$srcdir/${pkgname[0]}"
+ python setup.py build
+
+ cd "$srcdir/${pkgname[1]}"
+ python2 setup.py build
+}
+
+package_python-sounddevice-git() {
+ cd ${pkgname[0]}
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-sounddevice-git() {
+ depends=(portaudio python2 python2-cffi)
+ optdepends=('python2-numpy: to play back and record NumPy arrays')
+ conflicts=(python2-sounddevice)
+
+ cd ${pkgname[1]}
+ python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et: