Add pocketsphinx
This commit is contained in:
parent
3068a3825a
commit
8b87fb9154
|
@ -0,0 +1,31 @@
|
||||||
|
Copyright (c) 1999-2016 Carnegie Mellon University. All rights
|
||||||
|
reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
|
||||||
|
This work was supported in part by funding from the Defense Advanced
|
||||||
|
Research Projects Agency and the National Science Foundation of the
|
||||||
|
United States of America, and the CMU Sphinx Speech Consortium.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
|
||||||
|
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
|
||||||
|
NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
# Maintainer: Marco Pompili <marcs DOT pompili AT gmail DOT com>
|
||||||
|
# Contributor: Ben Duffield <bavardage AT archlinux.us>
|
||||||
|
|
||||||
|
pkgname=pocketsphinx
|
||||||
|
pkgver=5prealpha
|
||||||
|
pkgrel=4
|
||||||
|
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'
|
||||||
|
license=('BSD')
|
||||||
|
makedepends=('swig' 'python2' 'python' 'automake-1.13')
|
||||||
|
depends=('sphinxbase=5prealpha' '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=('2c4fb3a1318bb2470997ab7eb98ef69a'
|
||||||
|
'98034d99abfdcf2712d3a07e6df00b21')
|
||||||
|
options=('!libtool')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2"
|
||||||
|
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
|
||||||
|
msg2 "Building python3 environment"
|
||||||
|
cd "$pkgname-$pkgver-py3"
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
msg2 "Building python2 environment"
|
||||||
|
cd "../$pkgname-$pkgver-py2"
|
||||||
|
export PYTHON=/usr/bin/python2
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
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/python3.5/site-packages/pocketsphinx"
|
||||||
|
}
|
Loading…
Reference in New Issue