1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/icc/icc.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
19 hook_add prepatch 5 'icc_extract_rpm'
21 iccarch=`echo $arch | sed -e s/x86-64/em64t/ -e s/x86/i386/`
22 for x in intel-icc[e0-9]*.$iccarch.rpm; do
23 echo "Extracting $x ..."
24 rpm2cpio $x | cpio -id 2> /dev/null
28 hook_add preconf 5 'icc_license'
30 mkdir -p $root/$prefix/licenses
31 echo "Copying local licence file (will not be packaged) ..."
32 # FIXME: this is wrong, the serial has to be converted into a
33 # real license file to be able to use ICC
34 echo $SDECFG_PKG_ICC_SERIAL_NUMBER > $root/$prefix/licenses/t2.lic
36 cat <<-EOT > $root/$prefix/licenses/README
37 Copy your license (*.lic) files to this directory.
38 Sorry - we are not allowed to bundle a license file
39 in the Intel CC binary package for T2.
43 hook_add postmake 5 'icc_install'
45 for x in $( grep -l "<INSTALLDIR>" opt/intel/cc*/*/bin/* ); do
46 sed -i "s,<INSTALLDIR>,/$prefix,g" $x
49 tar -cf - * | tar -xv -C $root/$prefix -f -
52 [ $SDECFG_DEFAULT_CC != icc ] || ln -sf icc $root$bindir/cc
53 [ $SDECFG_DEFAULT_CXX != icc ] || ln -sf icc $root$bindir/c++
56 var_append flist''del '|' "$prefix/licenses/t2.lic"