summarylogtreecommitdiffstats
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
downloadaur-python-sounddevice-git.tar.gz
Initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD53
2 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..85e54b5952e9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = python-sounddevice-git
+ pkgdesc = Play and Record Sound with Python
+ pkgver = 0.3.10.2.g5eb0041
+ pkgrel = 1
+ url = http://python-sounddevice.rtfd.io/
+ arch = any
+ license = MIT
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ makedepends = python2-cffi
+ depends = portaudio
+ depends = python
+ depends = python-cffi
+ optdepends = python-numpy: to play back and record NumPy arrays
+ conflicts = python-sounddevice
+ source = python-sounddevice-git::git+https://github.com/spatialaudio/python-sounddevice.git
+ sha256sums = SKIP
+
+pkgname = python-sounddevice-git
+
+pkgname = python2-sounddevice-git
+ depends = portaudio
+ depends = python2
+ depends = python2-cffi
+ optdepends = python2-numpy: to play back and record NumPy arrays
+ conflicts = python2-sounddevice
+
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: