easyblock = 'MakeCp'

name = 'randfold'
version = '2.0.1'

homepage = 'http://bioinformatics.psb.ugent.be/software/details/Randfold'
description = "Minimum free energy of folding randomization test software"

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

source_urls = ['http://bioinformatics.psb.ugent.be/supplementary_data/erbon/nov2003/downloads/']
sources = [SOURCE_TAR_GZ]

cleanupoldinstall = False

# also install included SQUID dependency, since it can't be found online anymore...
prebuildopts = "tar xfvz squid.tar.gz && cd squid-*/ && mkdir -p %(installdir)s && "
prebuildopts += "./configure --prefix=%(installdir)s && make && make install && cd .. && "
prebuildopts += "export CPATH=%(installdir)s/include:$CPATH && export LIBRARY_PATH=%(installdir)s/lib:$LIBRARY_PATH && "

buildopts = 'CC="$CC" CFLAGS="$CFLAGS"'

files_to_copy = [(['randfold'], 'bin')]

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

moduleclass = 'bio'
