OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.8 KiB

  1. #!/bin/sh
  2. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # T2 SDE: package/.../icc/icc.conf
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. prefix=opt/icc
  17. set_confopt
  18. makeopt=
  19. makeinstopt=
  20. hook_add prepatch 5 'icc_extract_rpm'
  21. icc_extract_rpm() {
  22. iccarch=`echo $arch | sed -e s/x86-64/em64t/ -e s/x86/i386/`
  23. for x in intel-icc[e0-9]*.$iccarch.rpm ; do
  24. echo "Extracting $x ..."
  25. rpm2cpio $x | cpio -id 2> /dev/null
  26. done
  27. }
  28. hook_add preconf 5 'icc_license'
  29. 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
  35. cat <<-EOT > $root/$prefix/licenses/README
  36. Copy your license (*.lic) files to this directory.
  37. Sorry - we are not allowed to bundle a license file
  38. in the Intel CC binary package for T2.
  39. EOT
  40. }
  41. hook_add postmake 5 'icc_install'
  42. icc_install() {
  43. for x in $( grep -l "<INSTALLDIR>" opt/intel/cc*/*/bin/* ) ; do
  44. sed -i "s,<INSTALLDIR>,/$prefix,g" $x
  45. done
  46. ( cd opt/intel/cc*/*/
  47. tar -cf - * | tar -xv -C $root/$prefix -f -
  48. )
  49. [ $SDECFG_DEFAULT_CC != icc ] || ln -sf icc $root/$bindir/cc
  50. [ $SDECFG_DEFAULT_CXX != icc ] || ln -sf icc $root/$bindir/c++
  51. }
  52. var_append flist''del '|' "$prefix/licenses/t2.lic"