public
Last active

Updated PKGBUILD for intel-mkl

  • Download Gist
PKGBUILD
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
# Maintainer: monson <holymonson@gmail.com>
# Contributor: giniu <gginiu@gmail.com>
# Contributor: Tim Besard <tim.besard@gmail.com>
 
pkgname=intel-mkl
pkgver=10.3.10
pkgrel=1
pkgdesc="Intel Math Kernel Library, for non-commercial use."
arch=('i686' 'x86_64')
url="http://software.intel.com/en-us/intel-mkl/"
license=('custom')
makedepends=('cpio')
 
_build=319
_urlnumber=2591
 
if [ "$CARCH" == "x86_64" ]; then
_intel_arch=intel64
_archive_md5='50d1d3f62e3db648d1854517fc8da6ce'
elif [ "$CARCH" == "i686" ]; then
_intel_arch=ia32
_archive_md5='d58aa56e7cec7a3d75dda744666f4605'
fi
 
_archive=l_mkl_$pkgver.${_build}_${_intel_arch}
_install_prefix=/opt/intel/composerxe
 
source=("http://registrationcenter-download.intel.com/irc_nas/${_urlnumber}/${_archive}.tgz"
config.ini)
md5sums=(${_archive_md5}
'932cdcdf8a791dbad245367a2eec72dc')
 
 
build() {
cd "$srcdir"/${_archive}
msg "Checking licenses..."
if ! ( [ -f $HOME/intel/licenses/*.lic ] || [ -f /opt/intel/licenses/*.lic ] ); then
msg "ERROR: NO license file be found.
 
** http://software.intel.com/en-us/articles/non-commercial-software-development/
** Before re-building, visit the website above to ask for a non-commercial license,
** and place the .lic file in /opt/intel/licenses/ (*) OR \$HOME/intel/licenses/ .
"
return 1
fi
msg "Modifying install prefix..."
sed -e "s|PSET_INSTALL_DIR=.*|PSET_INSTALL_DIR=$pkgdir${_install_prefix}|g" "$srcdir"/config.ini > ./config.ini
grep -rlI "\$HOME/intel" . | xargs sed -i -e "s|\$HOME/intel|$pkgdir/opt/intel|g"
msg "Unpacking..."
mkdir -p "$srcdir"/tmp
./install.sh -t "$srcdir"/tmp -s ./config.ini
msg "Removing extra empty directories..."
cd "$HOME"
rmdir --ignore-fail-on-non-empty -p intel/licenses/
}
 
package() {
msg "Fixing paths in files..."
grep -rlI "$pkgdir/opt/intel" "$pkgdir" | xargs sed -i -e "s|$pkgdir/opt/intel|/opt/intel|g"
msg "Installing documentations..."
install -d "$pkgdir"/usr/share/licenses/${pkgname}/
install -D -m 644 "$srcdir"/${_archive}/license "$pkgdir"/usr/share/licenses/${pkgname}/
install -d "$pkgdir"/usr/share/doc/
ln -sf ${_install_prefix}/Documentation/en_US/mkl "$pkgdir"/usr/share/doc/${pkgname}
msg "Installing profile..."
_mklvars_file=${_install_prefix}/mkl/bin/${_intel_arch}/mklvars_${_intel_arch}.sh
sed -i -e "s|^${_install_prefix}|source ${_install_prefix}|" "$pkgdir"${_mklvars_file} # patch for global environment
install -D -m 755 "$pkgdir"${_mklvars_file} "$pkgdir"/etc/profile.d/${pkgname}.sh
}

Seems 11.0 is out :) I try to modify this one but always get an unsupported os error

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.