# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
# Author: Pablo Escobar Lopez
# sciCORE - University of Basel
# SIB Swiss Institute of Bioinformatics 

easyblock = 'Binary'

name = 'IMOD'
version = '4.7.15'
versionsuffix = '_RHEL6-64_CUDA6.0'

homepage = 'http://bio3d.colorado.edu/imod/'
description = """IMOD is a set of image processing, modeling and display programs 
 used for tomographic reconstruction and for 3D reconstruction of EM serial sections 
 and optical sections."""

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

source_urls = ['http://bio3d.colorado.edu/imod/AMD64-RHEL5/']
sources = ['%(namelower)s_%(version)s%(versionsuffix)s.csh']

dependencies = [('Java', '1.7.0_80')]

install_cmd = "csh %(namelower)s_%(version)s%(versionsuffix)s.csh -dir %(installdir)s -script %(installdir)s/ -yes"

# the provied init script located in %(installdir)s also defines a bash/csh function named 'subm'.
# It's not possible to define a function in the module file 
modloadmsg = """Bash users run: 'source $EBROOTIMOD/IMOD-linux.sh'
csh users run: 'source $EBROOTIMOD/IMOD-linux.csh'"""

modextravars = {
    'IMOD_JAVADIR': '\$EBROOTJAVA',
}

sanity_check_paths = {
    'files': ['IMOD/bin/imod'],
    'dirs': [],
}

moduleclass = 'bio'
