diff options
author | Marco Pompili | 2015-12-03 16:18:11 +0100 |
---|---|---|
committer | Marco Pompili | 2015-12-03 16:18:11 +0100 |
commit | 4f609b963df9f827592624432280d8bad101e4e0 (patch) | |
tree | 4a3a67e57cfcfbaaea5a41750c3a0c7a4fe1508a | |
parent | f9ef36ce3afc38567bf3f8534991f26404a6dda2 (diff) | |
download | aur-4f609b963df9f827592624432280d8bad101e4e0.tar.gz |
Version 5prealpha-3, with both python2 and python3 bindings
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 26 insertions, 24 deletions
@@ -1,17 +1,17 @@ pkgbase = pocketsphinx pkgdesc = Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop. pkgver = 5prealpha - pkgrel = 2 + pkgrel = 3 url = http://cmusphinx.sourceforge.net arch = i686 arch = x86_64 - license = BSD-2 + license = BSD + makedepends = swig depends = sphinxbase=5prealpha depends = python2 + depends = python depends = gstreamer0.10-base depends = gst-plugins-base-libs - depends = libpulse - depends = libsamplerate options = !libtool source = http://downloads.sourceforge.net/cmusphinx/pocketsphinx-5prealpha.tar.gz source = https://raw.githubusercontent.com/cmusphinx/pocketsphinx/master/LICENSE @@ -3,46 +3,48 @@ pkgname=pocketsphinx pkgver=5prealpha -pkgrel=2 +pkgrel=3 pkgdesc='Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop.' arch=('i686' 'x86_64') url='http://cmusphinx.sourceforge.net' -depends=('sphinxbase=5prealpha' 'python2' 'gstreamer0.10-base' 'gst-plugins-base-libs' 'libpulse' 'libsamplerate') -license=('BSD-2') +license=('BSD') +makedepends=('swig') +depends=('sphinxbase=5prealpha' 'python2' 'python' 'gstreamer0.10-base' 'gst-plugins-base-libs') source=("http://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz" "https://raw.githubusercontent.com/cmusphinx/pocketsphinx/master/LICENSE") md5sums=('e8402e90570935b26745d313c133b376' '93bfe6b712fe592d844ef581e1e53d47') options=('!libtool') -build() { - cd $pkgname-$pkgver +prepare() { + cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2" + cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3" +} - find -type f -exec sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' {} \; - find -type f -exec sed -i 's_/usr/bin/python_/usr/bin/python2_' {} \; - find -type f -exec sed -i 's_python -c_python2 -c_' {} \; - find -type f -exec sed -i 's_python-config_python2-config_' {} \; - find -type f -exec sed -i 's_cython_cython2_' {} \; +build() { + cd "$pkgname-$pkgver-py3" + ./configure --prefix=/usr + make + cd "../$pkgname-$pkgver-py2" export PYTHON=/usr/bin/python2 - export PYTHON_CONFIG=/usr/bin/python2-config - - ./autogen.sh \ - --prefix=/usr \ - --with-sphinxbase=auto \ - --with-python=/usr/bin/python2 + ./configure --prefix=/usr make } package() { - cd $pkgname-$pkgver + cd "$pkgname-$pkgver-py3" make DESTDIR="$pkgdir" install + cd "../$pkgname-$pkgver-py2/swig" + make DESTDIR="$pkgdir" install + install -d -m755 "$pkgdir/usr/share/licenses/$pkgname" install -D -m644 "${srcdir}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - libtool --finish "$pkgdir/usr/lib" - libtool --finish "$pkgdir/usr/lib/gstreamer-1.0" - libtool --finish "$pkgdir/usr/lib/python2.7/site-packages/pocketsphinx" + libtool --finish "$pkgdir/usr/lib" + libtool --finish "$pkgdir/usr/lib/gstreamer-1.0" + libtool --finish "$pkgdir/usr/lib/python2.7/site-packages/pocketsphinx" + libtool --finish "$pkgdir/usr/lib/python3.5/site-packages/pocketsphinx" } |