diff options
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | cython2_makefile.patch | 9 |
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bd5f7a44006e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = pocketsphinx + pkgdesc = Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop. + pkgver = 0.8 + pkgrel = 5 + url = http://cmusphinx.sourceforge.net + arch = i686 + arch = x86_64 + license = custom + depends = sphinxbase>=0.8 + depends = python2 + depends = gstreamer0.10-base + depends = libpulse + depends = libsamplerate + options = !libtool + source = http://downloads.sourceforge.net/cmusphinx/pocketsphinx-0.8.tar.gz + source = cython2_makefile.patch + md5sums = 9f6fb6277d57fb33d2c49d4184587d26 + md5sums = 7524229c5d82c49a5c4afabd7f891a65 + +pkgname = pocketsphinx + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e95e9c4a2f83 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Marco Pompili < marcs DOT pompili AT gmail.com> +# Contributor: Ben Duffield <bavardage AT archlinux.us> + +pkgname=pocketsphinx +pkgver=0.8 +pkgrel=5 +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>=0.8' 'python2' 'gstreamer0.10-base' 'libpulse' 'libsamplerate') +license=('custom') +source=("http://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz" "cython2_makefile.patch") +md5sums=('9f6fb6277d57fb33d2c49d4184587d26' + '7524229c5d82c49a5c4afabd7f891a65') +options=('!libtool') + +build() { + cd $pkgname-$pkgver + + 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_' {} \; + + #sed -i '/cython/s/$(CPPFLAGS) -I$(sphinxbase)\/python/$(SphinxBase_CFLAGS)/' python/Makefile.am + + patch -Np1 -i ${srcdir}/cython2_makefile.patch + + export PYTHON=/usr/bin/python2 + export PYTHON_CONFIG=/usr/bin/python2-config + + ./autogen.sh \ + --prefix=/usr \ + --with-sphinxbase=auto \ + --with-python=/usr/bin/python2 + make +} + +package() { + cd $pkgname-$pkgver + + make DESTDIR="$pkgdir" install + + install -d "$pkgdir/usr/share/licenses/$pkgname" + install -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname" +} diff --git a/cython2_makefile.patch b/cython2_makefile.patch new file mode 100644 index 000000000000..16704049946d --- /dev/null +++ b/cython2_makefile.patch @@ -0,0 +1,9 @@ +--- pocketsphinx-0.8/python/Makefile.am 2015-05-30 11:56:43.247774183 +0200 ++++ pocketsphinx-0.8/python/Makefile.am.cython2_fix 2015-05-30 11:58:15.540146568 +0200 +@@ -40,5 +40,5 @@ + + if BUILD_CYTHON + $(srcdir)/pocketsphinx.c: $(srcdir)/pocketsphinx.pyx $(srcdir)/pocketsphinx.pxd +- cython2 -o $@ $< $(CPPFLAGS) -I$(sphinxbase)/python ++ cython2 -o $@ $< $(SphinxBase_CFLAGS) + endif |