PKGBUILDs/pocketsphinx/default/PKGBUILD

56 lines
1.5 KiB
Bash
Raw Normal View History

2016-06-01 22:35:07 +02:00
# Maintainer: Marco Pompili <aur AT emarcs DOT org>
2016-05-10 17:20:11 +02:00
# Contributor: Ben Duffield <bavardage AT archlinux.us>
2016-05-10 17:27:55 +02:00
# Contributor: Martchus <martchus@gmx.net>
2016-05-10 17:20:11 +02:00
pkgname=pocketsphinx
pkgver=5prealpha
pkgrel=11
pkgdesc='Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop.'
2016-05-10 17:20:11 +02:00
arch=('i686' 'x86_64')
url='http://cmusphinx.sourceforge.net'
license=('BSD')
makedepends=('swig' 'python2' 'python')
depends=('sphinxbase=5prealpha' 'gst-plugins-base-libs')
source=("http://downloads.sourceforge.net/cmusphinx/$pkgname-$pkgver.tar.gz")
sha256sums=('ef5bb5547e2712bdf571f256490ef42a47962033892efd9d7df8eed7fe573ed9')
2016-05-10 17:20:11 +02:00
options=('!libtool')
prepare() {
2016-06-01 22:35:07 +02:00
cd "$pkgname-$pkgver"
2016-06-01 22:35:07 +02:00
msg2 "Reconfiguring project for current version of Automake"
autoreconf -ivf > /dev/null
2016-06-01 22:35:07 +02:00
cd ..
2016-06-01 22:35:07 +02:00
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py2"
cp -R "$pkgname-$pkgver" "$pkgname-$pkgver-py3"
2016-05-10 17:20:11 +02:00
}
build() {
2016-05-10 17:20:11 +02:00
msg2 "Building python3 environment"
export PYTHON=/usr/bin/python
2016-05-10 17:20:11 +02:00
cd "$pkgname-$pkgver-py3"
./configure --prefix=/usr
make
msg2 "Building python2 environment"
2020-01-19 12:17:24 +01:00
cd "../$pkgname-$pkgver-py2"
export PYTHON=/usr/bin/python2
2016-05-10 17:20:11 +02:00
./configure --prefix=/usr
2020-01-19 12:17:24 +01:00
make
2016-05-10 17:20:11 +02:00
}
package() {
2020-01-19 12:17:24 +01:00
cd "$pkgname-$pkgver-py3"
2016-05-10 17:20:11 +02:00
2020-01-19 12:17:24 +01:00
make DESTDIR="$pkgdir" install
2016-05-10 17:20:11 +02:00
cd "../$pkgname-$pkgver-py2/swig"
make DESTDIR="$pkgdir" install
2020-01-19 12:17:24 +01:00
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2016-05-10 17:20:11 +02:00
}