easyblock = 'Binary'

name = 'USEARCH'
ver1 = '5.2.236'
ver2 = '6.1.544'
version = '%s-%s' % (ver1, ver2)
versionsuffix = '-i86linux32'

homepage = 'http://www.drive5.com/usearch/index.html'
description = """USEARCH is a unique sequence analysis tool which offers search and clustering algorithms that are
 often orders of magnitude faster than BLAST."""

toolchain = {'name': 'dummy', 'version': 'dummy'}

# download via http://www.drive5.com/usearch/download.html
usearch5_bin = 'usearch%s_%s' % (ver1, versionsuffix[1:])
usearch6_bin = 'usearch%s_%s' % (ver2, versionsuffix[1:])
sources = [
    usearch5_bin,
    usearch6_bin,
]

install_cmd = "mkdir -p %(installdir)s/bin && "
install_cmd += "cp %s %%(installdir)s/bin/%%(namelower)s && " % usearch5_bin
install_cmd += "cp %s %%(installdir)s/bin/%%(namelower)s61 && " % usearch6_bin
install_cmd += "chmod a+rx %(installdir)s/bin/*"

modloadmsg = """USEARCH (32-bit) is licensed software but
 can be used for free by individuals when registered. A 64-bit version is
 also available. For more information see http://www.drive5.com/usearch ."""

sanity_check_paths = {
    'files': ['bin/%(namelower)s', 'bin/%(namelower)s61'],
    'dirs': [],
}

moduleclass = 'bio'
