easyblock = 'ConfigureMake'

name = 'FDS'
version = '6.3.0'

homepage = 'http://firemodels.github.io/fds-smv/'
description = """Fire Dynamics Simulator (FDS) is a large-eddy simulation (LES) code for low-speed flows,
 with an emphasis on smoke and heat transport from fires."""

toolchain = {'name': 'intel', 'version': '2015b'}
toolchainopts = {'pic': True, 'usempi': True}

source_urls = ['https://github.com/firemodels/fds-smv/archive/']
sources = ['e6ca47c.tar.gz']

patches = ['FDS-r18915_makefile.patch']

unpack_options = '--strip-local_components=1'

start_dir = 'FDS_Compilation'

# just run make in the install dir
skipsteps = ['configure', 'install']
buildininstalldir = True

prebuildopts = 'env FFLAGS="$FFLAGS -fpp"'

modextrapaths = {'PATH': 'FDS_Compilation'}

sanity_check_paths = {
    'files': ['FDS_Compilation/fds'],
    'dirs': [],
}
moduleclass = 'phys'
