1 # Maintainer: Moritz Maxeiner <moritz@ucworks.org>
6 pkgdesc="Modified version (patch) of the Hidden Markov Model Toolkit (htk)."
8 url="http://hts.sp.nitech.ac.jp/"
11 makedepends=('wget' 'patch')
13 source=(http://hts.sp.nitech.ac.jp/archives/$pkgver/HTS-${pkgver}_for_HTK-$_htkver.tar.bz2)
14 md5sums=('76b7674a01f1edfeb5b4bbca4f5e39a2')
19 echo "Please put the necessary files 'HTK-$_htkver.tar.gz' and 'HDecode-$_htkver.tar.gz' in the folder $srcdir/../ and press [ENTER]."
20 echo -n "If you do not have them, press [ENTER] and they will be downloaded for you..."
24 if [ ! -e HTK-$_htkver.tar.gz ] || [ ! -e HDecode-$_htkver.tar.gz ]; then
25 # HTK account necessary to download HTK source code
26 echo "You need an HTK account to download the source code HTS uses."
27 echo "You can create such an account here: http://htk.eng.cam.ac.uk/register.shtml"
28 echo "Please proceed only if you have one, the build will fail otherwise!"
30 echo -n "Please enter your HTK username: "
32 echo -n "Please enter your HTK password: "
35 # Get the htk source code
36 wget --user=$username --password=$password http://htk.eng.cam.ac.uk/ftp/software/HTK-$_htkver.tar.gz
37 wget --user=$username --password=$password http://htk.eng.cam.ac.uk/ftp/software/hdecode/HDecode-$_htkver.tar.gz
40 if [ $(md5sum HTK-$_htkver.tar.gz) != "b3fc12006b0af12f59cd573c07aa4c1d" ]; then
41 echo "HTK md5sum wrong"
44 if [ $(md5sum HDecode-$_htkver.tar.gz) != "4e332a7fea6db58751cec878b80c3575" ]; then
45 echo "HDecode md5sum wrong"
49 cp HTK-$_htkver.tar.gz $srcdir/
50 cp HDecode-$_htkver.tar.gz $srcdir/
52 bsdtar -xf HTK-$_htkver.tar.gz
53 bsdtar -xf HDecode-$_htkver.tar.gz
55 echo "Patching HTK source code to HTS..."
56 patch -p1 -t -d . < "./../HTS-${pkgver}_for_HTK-$_htkver.patch"
58 echo "Beginning build..."
59 CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}" ./configure --prefix=/usr
65 make prefix="$pkgdir/usr" install
67 # The HTK license applying to the package
68 install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE-HTK
69 # The HDecode extension license
70 install -D -m644 HTKLVRec/HDecode-license.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-HDecode
71 # The HTS license applying to the patch
72 install -D -m644 $srcdir/COPYING ${pkgdir}/usr/share/licenses/$pkgname/COPYING-HTS