Guest User

PKGBUILD for HTK with HDecode

a guest
Jan 20th, 2015
330
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Contributor: Oliver Bandel <oliver@first.in-berlin.de>
  2. # Derived from the 32-bit version PKGBUILD (J. Lichtblau and T. Adams)
  3.  
  4. pkgname=htk
  5. pkgver=3.4.1
  6. pkgrel=3
  7. pkgdesc="A portable toolkit primarily used for speech recognition research"
  8. arch=('x86_64')
  9. #arch=('i686')
  10. url="http://htk.eng.cam.ac.uk/"
  11. license=('custom: Proprietary')
  12. depends=('lib32-glibc' 'lib32-libx11')
  13. makedepends=('wget' 'gcc-multilib')
  14. options=('!makeflags')
  15. #source=(http://htk.eng.cam.ac.uk/ftp/software/HTK-$pkgver.tar.gz)
  16. source=(mkfile.in.patch)
  17. #md5sums=('b3fc12006b0af12f59cd573c07aa4c1d')
  18. md5sums=('10eec9a139acea719c0b9f451d8f7807')
  19.  
  20. build() {
  21.  
  22. # Note: HTK cannot be downloaded without a username/password. Use name and password from your registration here.
  23. # http://htk.eng.cam.ac.uk/ftp/software/HTK-3.4.1.tar.gz
  24.   #htk_username=YOUR_USERNAME
  25.   #htk_password=YOUR_PASSWORD
  26.   #wget --user=${htk_username} --password=${htk_password} http://htk.eng.cam.ac.uk/ftp/software/HTK-$pkgver.tar.gz
  27.   #if [ -n "$ENABLE_HDECODE" ]; then
  28.   #  wget --user=${htk_username} --password=${htk_password} http://htk.eng.cam.ac.uk/ftp/software/hdecode/HDecode-$pkgver.tar.gz
  29.   #fi
  30.  
  31.   # unpack file(s)
  32.   tar -xzvf HTK-$pkgver.tar.gz
  33.   if [ -n "$ENABLE_HDECODE" ]; then
  34.     tar -xzvf HDecode-$pkgver.tar.gz
  35.   fi
  36.  
  37.   #mv htk ${pkgname}   # needed before, as pkgname was "pkg64"
  38.   # here now 64-bit-optimization might be introduced...
  39.   if  [ "$HOSTTYPE" == "x86_64" ];
  40.   then
  41.     echo 64 Bit
  42.   else
  43.     echo 32 Bit
  44.   fi
  45.  
  46. set | grep -e 32 -e 64
  47. #exit
  48.   # substitute spaces instead of tabs in Makefile-rule
  49.   patch  ${srcdir}/${pkgname}/HLMTools/Makefile.in ../mkfile.in.patch
  50.  
  51.  
  52.   # make the stuff
  53.   cd ${srcdir}/${pkgname}
  54.   if [ -n "$ENABLE_HDECODE" ]; then
  55.     ./configure --enable-hdecode --prefix=${pkgdir}/usr
  56.   else
  57.     ./configure --prefix=${pkgdir}/usr
  58.   fi
  59.  
  60.   make all
  61. }
  62.  
  63. package() {
  64.   # create a needed dir
  65.   mkdir -p ${pkgdir}/usr/bin
  66.  
  67.   # install binaries
  68.   cd ${srcdir}/${pkgname}
  69.   make install
  70.  
  71.  # install License
  72.   install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
  73. }
RAW Paste Data