easyblock = 'ConfigureMake'

name = 'likwid'
version = '4.1.0'

homepage = 'http://code.google.com/p/likwid/'
description = """Likwid stands for Like I knew what I am doing. This project contributes easy to use
 command line tools for Linux to support programmers in developing high performance multi threaded programs."""

toolchain = {'name': 'GCCcore', 'version': '4.9.3'}
toolchainopts = {'pic': True}

sources = [SOURCE_TAR_GZ]
source_urls = ['https://github.com/RRZE-HPC/likwid/archive/']

patches = ['likwid-%(version)s-config-mk.patch']

builddependencies = [('binutils', '2.25', '', ('GCCcore', '4.9.3'))]

skipsteps = ['configure']
buildopts = 'CC="$CC" CFLAGS="$CFLAGS -std=c99" PREFIX=%(installdir)s'
installopts = 'PREFIX=%(installdir)s'

sanity_check_paths = {
    'files': ["bin/likwid-memsweeper", "bin/likwid-mpirun", "bin/likwid-perfctr",
              "bin/likwid-perfscope", "bin/likwid-pin", "bin/likwid-powermeter", "bin/likwid-topology",
              "lib/liblikwidpin.%s" % SHLIB_EXT, "lib/liblikwid.%s" % SHLIB_EXT],
    'dirs': ["man/man1"]
}

maxparallel = 1

moduleclass = 'devel'
