easyblock = 'MakeCp'

name = 'PhyloBayes-MPI'
version = '20161021'
local_commit = 'e4ea1ca'

homepage = 'https://github.com/bayesiancook/pbmpi'
description = "A Bayesian software for phylogenetic reconstruction using mixture models"

toolchain = {'name': 'intel', 'version': '2017.00'}

source_urls = ['https://github.com/bayesiancook/pbmpi/archive/']
sources = ['%s.tar.gz' % local_commit]

start_dir = 'sources'

# get rid of included binaries to ensur they're relocal_compiled
prebuildopts = "rm -f data/* &&"

buildopts = 'CC="$MPICXX" CPPFLAGS="$CXXFLAGS -c" LDFLAGS="$CXXFLAGS"'

files_to_copy = [(['data/*'], 'bin')]

sanity_check_paths = {
    'files': [
        'bin/bplocal_comp',
        'bin/cvrep',
        'bin/pb_mpi',
        'bin/readpb_mpi',
        'bin/tracelocal_comp'],
    'dirs': [],
}

moduleclass = 'bio'
