easyblock = 'MakeCp'

name = 'BBMap'
version = '36.62'
versionsuffix = '-Java-%(javaver)s'

homepage = 'https://sourceforge.net/projects/bbmap/'
description = """BBMap short read aligner, and other bioinformatic tools."""

toolchain = {'name': 'intel', 'version': '2016b'}

source_urls = [SOURCEFORGE_SOURCE]
sources = ['%(name)s_%(version)s.tar.gz' ]

dependencies = [('Java', '1.8.0_112', '', True)]

prebuildopts = 'cd jni && '

suff = {'Darwin': 'osx', 'Linux': 'linux'}[OS_TYPE]
buildopts = "-f makefile.%s" % suff

files_to_copy = ['*']

sanity_check_paths = {
    'files': ['bbmap.sh'],
    'dirs': []
}

modextrapaths = {'PATH': ''}

modloadmsg = "For improved speed, add 'usejni=t' to the command line of %(name)s tools which support the use of the"
modloadmsg += " compiled jni C code.\n"

moduleclass = 'bio'
