easyblock = 'ConfigureMake'

name = 'gnutls'
version = '3.1.8'

homepage = 'http://www.gnutls.org/'
description = "gnutls-3.0.22: GNU Transport Layer Security library"

toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'}

source_urls = ['ftp://ftp.gnutls.org/pub/gnutls/']
sources = [SOURCE_TAR_XZ]

dependencies = [
    ('GMP', '5.0.5'),
    ('nettle', '2.6'),
    ('guile', '1.8.8'),
]

configopts = "--with-guile-site-dir=$EBROOTGUILE"

sanity_check_paths = {
    'files': [
        'bin/%s' %
        x for x in [
            'certtool',
            'danetool',
            'gnutls-cli',
            'gnutls-cli-debug',
            'gnutls-serv',
            'ocsptool',
            'psktool',
            'srptool']] +
    [
        'lib/libgnutls%s' %
        x for x in [
            '.a',
            'xx.a',
            '-xssl.a',
            '-openssl.a']],
    'dirs': ['include/gnutls'],
}

moduleclass = 'system'