diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/kaldi/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/kaldi/package.py | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/var/spack/repos/builtin/packages/kaldi/package.py b/var/spack/repos/builtin/packages/kaldi/package.py index bb2481d879..6b3457f12a 100644 --- a/var/spack/repos/builtin/packages/kaldi/package.py +++ b/var/spack/repos/builtin/packages/kaldi/package.py @@ -1,29 +1,9 @@ -############################################################################## -# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. +# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. # -# This file is part of Spack. -# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/spack/spack -# Please also see the NOTICE and LICENSE files for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License (as -# published by the Free Software Foundation) version 2.1, February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + from spack import * -from distutils.dir_util import copy_tree from os.path import join from fnmatch import fnmatch import os @@ -35,11 +15,11 @@ class Kaldi(Package): # Does not use Autotools Kaldi is intended for use by speech recognition researchers.""" homepage = "https://github.com/kaldi-asr/kaldi" - url = "https://github.com/kaldi-asr/kaldi/archive/master.zip" + git = "https://github.com/kaldi-asr/kaldi.git" - version('master', git='https://github.com/kaldi-asr/kaldi.git') - version('c024e8', git='https://github.com/kaldi-asr/kaldi.git', - commit='c024e8aa0a727bf76c91a318f76a1f8b0b59249e') + version('master') + version('2018-07-11', commit='6f2140b032b0108bc313eefdca65151289642773') + version('2015-10-07', commit='c024e8aa0a727bf76c91a318f76a1f8b0b59249e') variant('shared', default=True, description='build shared libraries') @@ -53,18 +33,16 @@ class Kaldi(Package): # Does not use Autotools depends_on('sph2pipe', type='run') depends_on('sctk', type='run') depends_on('speex', type='run') - depends_on('openfst@1.4.1-patch', when='@c024e8') + depends_on('openfst@1.4.1-patch', when='@2015-10-07') + depends_on('openfst@1.6.0:', when='@2018-07-11') depends_on('openfst') - patch('openfst-1.4.1.patch', when='@c024e8') + patch('openfst-1.4.1.patch', when='@2015-10-07') def install(self, spec, prefix): configure_args = ['--fst-root=' + spec['openfst'].prefix] - - if spec.satisfies('c024e8'): - configure_args.append('--speex-root=' + spec['speex'].prefix) - configure_args.append('--fst-version=' + - str(spec['openfst'].version)) + configure_args.append('--fst-version=' + str(spec['openfst'].version)) + configure_args.append('--speex-root=' + spec['speex'].prefix) if '~shared' in spec: configure_args.append('--static') @@ -96,13 +74,18 @@ class Kaldi(Package): # Does not use Autotools make() mkdirp(prefix.bin) - for root, dirs, files in os.walk('bin'): + for root, dirs, files in os.walk('.'): for name in files: + if name.endswith(".so") or name.endswith(".cc") \ + or name.endswith(".pptx"): + continue + if "configure" is name: + continue if os.access(join(root, name), os.X_OK): install(join(root, name), prefix.bin) mkdir(prefix.lib) - copy_tree('lib', prefix.lib) + install_tree('lib', prefix.lib) for root, dirs, files in os.walk('.'): for name in files: |