# IT4Innovations 2019

name = 'VTune'
version = '2019_update8'

homepage = 'http://software.intel.com/en-us/intel-vtune-amplifier-xe'
description = "Intel VTune Amplifier XE 2016 is the premier performance profiler for C, C++, C#, Fortran, Assembly and Java."

toolchain = SYSTEM

sources = ['vtune_amplifier_%(version)s.tar.gz']
checksums = ['d15b84ea16f7529e8bd0508ab8e98eba']

dontcreateinstalldir = 'True'

# license file
license_file = '/apps/licenses/intel/license.lic'

dependencies = [
   ('X11', '20190717'),
   ('GTK+', '3.24.13')
]

sanity_check_paths = {
    'files': [],
    'dirs': ['vtune_amplifier_2019.8.0.604197'],
}

# Do necessary post-install steps to build VTune kernel modules
postinstallcmds = [
    'mkdir %(installdir)s/modules',
    'cd %(installdir)s/vtune_amplifier/sepdk/src/ && '
    './build-driver --install-dir=%(installdir)s/modules --non-interactive',
    'sed "s|DEFAULT_GROUP=vtune|DEFAULT_GROUP=wheel|" %(installdir)s/modules/pax/insmod-pax -i',
    'sed "s|DEFAULT_GROUP=vtune|DEFAULT_GROUP=wheel|" %(installdir)s/modules/vtsspp/insmod-vtsspp -i',
    'sed "s|DEFAULT_GROUP=vtune|DEFAULT_GROUP=wheel|" %(installdir)s/modules/insmod-sep -i',
]

moduleclass = 'tools'
