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

easyblock = "Tarball"

name = 'WEKA'
version = '3.6.12'

homepage = 'http://www.cs.waikato.ac.nz/ml/weka/index.html'
description = """ Weka is a collection of machine learning algorithms for data mining tasks.
 The algorithms can either be applied directly to a dataset or called from your own Java code.
 Weka contains tools for data pre-processing, classification, regression, clustering,
 association rules, and visualization. It is also well-suited for developing new machine
 learning schemes."""

toolchain = SYSTEM

source_urls = ['http://prdownloads.sourceforge.net/weka/']
sources = ['%s-%s.zip' % (name.lower(), version.replace('.', '-'))]

local_java = 'Java'
local_javaver = '1.7.0_80'
versionsuffix = '-%s-%s' % (local_java, local_javaver)

dependencies = [(local_java, local_javaver)]

sanity_check_paths = {
    'files': ["weka.jar"],
    'dirs': []
}

modextravars = {
    'WEKAINSTALL': '$root',
}

modloadmsg = " execute WEKA: local_java -jar \\$EBROOTWEKA/weka.jar "

moduleclass = 'bio'