easyblock = 'MakeCp'

name = 'BOINC'
version = '7.2.42'
versionsuffix = "-client"

homepage = 'https://boinc.berkeley.edu'
description = """BOINC is a program that lets you donate your idle computer time to science projects
 like SETI@home, Climateprediction.net, Rosetta@home, World Community Grid, and many others."""

toolchain = {'name': 'GCC', 'version': '4.8.2'}

# only through git, create your own tarball.
# e.g. git clone --depth=100 --branch client_release/7.2/7.2.42 git://boinc.berkeley.edu/boinc-v2.git boinc-7.2.42
# see https://boinc.berkeley.edu/trac/wiki/SourceCodeGit
sources = [SOURCELOWER_TAR_BZ2]

dependencies = [
    ('OpenSSL', '1.0.1f'),
    ('cURL', '7.34.0'),
]

builddependencies = [
    ('libtool', '2.4.2'),
    ('make', '3.82'),
    ('pkg-config', '0.28'),
    ('M4', '1.4.16'),
    ('Autoconf', '2.69'),
    ('Automake', '1.14.1')
]

prebuildopts = "./_autosetup && ./configure --disable-server --disable-manager --enable-client &&"

files_to_copy = [(['client/boinc', 'client/boinccmd'], 'bin')]

# make sure the binary are available after installation
sanity_check_paths = {
    'files': ['bin/boinc'],
    'dirs': [],
}

moduleclass = 'tools'
