# IT4Innovations 2020
# LK

name = 'VTune'
version = '2020_update2'
versionsuffix = '-intel-2020a'

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_profiler_%(version)s.tar.gz']
checksums = ['1fab744cc8b153b4a2c0342c3420cc01']

dontcreateinstalldir = 'True'

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

dependencies = [
   ('intel', '2020a'),
   ('Pango', '1.44.7', '-GCCcore-9.3.0'),
   ('X11', '20200222', '-GCCcore-9.3.0'),
   ('GTK+', '3.24.17', '-GCCcore-9.3.0'),
]

sanity_check_paths = {
    'files': [],
    'dirs': ['vtune_profiler_2020.2.0.610396'],
}

# Do necessary post-install steps to build VTune kernel modules
postinstallcmds = [
    'mkdir %(installdir)s/modules',
    'cd %(installdir)s/vtune_profiler/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'
