easyblock = 'ConfigureMake'

name = 'blasr_libcpp'
version = '20170426'
commit = 'cd49f36'

homepage = 'https://github.com/PacificBiosciences/blasr_libcpp'
description = """Blasr_libcpp is a library used by blasr and other executables such as samtoh5, loadPulses for
 analyzing PacBio sequences"""

toolchain = {'name': 'intel', 'version': '2017a'}

source_urls = ['https://github.com/PacificBiosciences/blasr_libcpp/archive/']
sources = ['%s.tar.gz' % commit]

dependencies = [
    ('HDF5', '1.8.18', '-serial'),
    ('pbbam', '20170508'),
]

unpack_options = "--strip-components=1"

skipsteps = ['configure', 'install']
buildininstalldir = True

prebuildopts = "./configure.py && "

sanity_check_paths = {
    'files': ['alignment/libblasr.a', 'alignment/libblasr.%s' % SHLIB_EXT, 'hdf/libpbihdf.a',
              'hdf/libpbihdf.%s' % SHLIB_EXT, 'pbdata/libpbdata.a', 'pbdata/libpbdata.%s' % SHLIB_EXT],
    'dirs': [],
}

modextrapaths = {
    'CPATH': ['alignment', 'hdf', 'pbdata'],
    'LD_LIBRARY_PATH': ['alignment', 'hdf', 'pbdata'],
    'LIBRARY_PATH': ['alignment', 'hdf', 'pbdata'],
}

moduleclass = 'bio'
