easyblock = 'ConfigureMake'

name = 'BSMAP'
version = '2.74'

homepage = 'https://code.google.com/p/bsmap/'
description = """BSMAP is a short reads mapping software for bisulfite sequencing reads."""

toolchain = {'name': 'goolf', 'version': '1.4.10'}

source_urls = ['https://bsmap.googlecode.com/files/']
sources = [SOURCELOWER_TGZ]

skipsteps = ['configure']

installopts = "DESTDIR=%(installdir)s"

patches = [
    'BSMAP-2.74_makefile-modif.patch',
    'BSMAP-2.74_parameters-cpp.patch',
    'BSMAP-2.74_samtools-deps.patch',
]

dependencies = [
    ('ncurses', '5.9'),
    ('zlib', '1.2.7'),
    ('SAMtools', '0.1.18'),
]

sanity_check_paths = {
    'files': ["bin/%s" % x for x in ["bsmap", "methratio.py", "sam2bam.sh"]],
    'dirs': [],
}

moduleclass = 'data'
