summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pompili2015-12-03 15:50:25 +0100
committerMarco Pompili2015-12-03 16:14:53 +0100
commit5e003ca80641c0856c8ed7d95b24cc17a40c66d4 (patch)
treec59e0485c82adc710c5d91cba87873963e5ca5b9
parent0394ba49e02dba1e065512f4c5c65f3deefc1ab6 (diff)
downloadaur-5e003ca80641c0856c8ed7d95b24cc17a40c66d4.tar.gz
Version 5prealpha-2, with both python2 and python3 bindings
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD63
2 files changed, 34 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 159c1a261334..cffb4b281527 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,14 @@
pkgbase = sphinxbase
pkgdesc = Common library for sphinx speech recognition.
pkgver = 5prealpha
- pkgrel = 1
+ pkgrel = 2
url = http://cmusphinx.sourceforge.net/
arch = i686
arch = x86_64
- license = BSD-2
+ license = BSD
makedepends = bison
- depends = python2
- depends = cython2
- depends = swig
+ makedepends = swig
depends = lapack
- depends = alsa-lib
depends = libpulse
depends = libsamplerate
options = !libtool
diff --git a/PKGBUILD b/PKGBUILD
index aed779d259d6..f05b75b9f906 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,54 +3,53 @@
pkgname=sphinxbase
pkgver=5prealpha
-pkgrel=1
+pkgrel=2
pkgdesc='Common library for sphinx speech recognition.'
url='http://cmusphinx.sourceforge.net/'
arch=('i686' 'x86_64')
-license=('BSD-2')
-options=('!libtool')
-makedepends=('bison')
-depends=('python2' 'cython2' 'swig' 'lapack' 'alsa-lib' 'libpulse' 'libsamplerate')
+license=('BSD')
+makedepends=('bison' 'swig')
+depends=('lapack' 'libpulse' 'libsamplerate') #not sure if libsamplerate is needed
source=("http://downloads.sourceforge.net/project/cmusphinx/${pkgname}/${pkgver}/$pkgname-$pkgver.tar.gz"
"https://raw.githubusercontent.com/cmusphinx/sphinxbase/master/LICENSE")
md5sums=('12acdeda1d597631947e5531463431f1'
'469fd92fa8cd1d4ca7ee0fe7435af689')
-_pythondir="$pkgdir/usr/lib/python2.7/site-packages"
-
-build() {
- cd $pkgname-$pkgver
-
- msg2 "Reconfiguring project for Automake v1.15"
- autoreconf -ivf > /dev/null
-
- msg2 "Setting python2 as the python installtion for ${pkgname}"
-
- 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_' {} \;
+options=('!libtool')
- export PYTHON=/usr/bin/python2
- export PYTHON_CONFIG=/usr/bin/python2-config
+prepare() {
+ cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2"
+ cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3"
+}
- msg2 "Building..."
+build() {
+ cd "$pkgname-$pkgver-py2"
- ./configure --prefix=/usr
+ msg2 "Building Sphinxbase with Python 2 bindings..."
+ ./configure --prefix=/usr
+ make
- make
+ cd "../$pkgname-$pkgver-py3"
+ msg2 "Building Sphinxbase with Python 3 bindings..."
+ export PYTHON=/usr/bin/python2
+ ./configure --prefix=/usr
+ make
}
package() {
- cd $pkgname-$pkgver
+ cd "$pkgname-$pkgver-py2"
- install -d $_pythondir
- PYTHONPATH=$_pythondir make DESTDIR="$pkgdir" install
+ msg2 "Installing Sphinxbase with Python 2 bindings"
+ make DESTDIR="$pkgdir/" install
- install -d "$pkgdir/usr/share/licenses/$pkgname"
+ msg2 "Installing Python 3 bindings"
+ cd "../$pkgname-$pkgver-py3/swig"
+ make DESTDIR="$pkgdir/" install
- install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -d "$pkgdir/usr/share/licenses/$pkgname"
+ install -m644 "${srcdir}/LICENSE" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- libtool --finish "$pkgdir/usr/lib"
- libtool --finish "$pkgdir/usr/lib/python2.7/site-packages/sphinxbase"
+ libtool --finish "$pkgdir/usr/lib"
+ libtool --finish "$pkgdir/usr/lib/python2.7/site-packages/sphinxbase"
+ libtool --finish "$pkgdir/usr/lib/python3.5/site-packages/sphinxbase"
}