Skip to content

Instantly share code, notes, and snippets.

@pfactum
Created June 27, 2018 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfactum/e717a836c02e904411ca2b3177758374 to your computer and use it in GitHub Desktop.
Save pfactum/e717a836c02e904411ca2b3177758374 to your computer and use it in GitHub Desktop.
# Maintainer: Oleksandr Natalenko <oleksandr@natalenko.name>
pkgname=("intel-c-compiler")
__year=2018
__update=3
__build=222
__id=13002
pkgver=${__year}.${__update}
pkgrel=1
url="https://software.intel.com/en-us/qualify-for-free-software"
arch=("x86_64")
license=("custom")
makedepends=("libarchive")
options=(strip libtool staticlibs)
source=("http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/${__id}/parallel_studio_xe_${__year}_update${__update}_composer_edition.tgz"
"intel-c-compiler.conf"
"intel-c-compiler.sh")
install="intel-c-compiler.install"
sha256sums=('f21f7759709a3d3e3390a8325fa89ac79b1fce8890c292e73b2ba3ec576ebd2b'
'451ecc4b8e09d85fe6fbe344cfbffb4ad9008bc0d7e6888b8ad38af48f124525'
'ab1d89fb1662a4303593503fd6ee815f11e39904d093cf78ec0e48edc8ac9d65')
build() {
cd "${srcdir}/parallel_studio_xe_${__year}_update${__update}_composer_edition"
mkdir -p build/etc/{ld.so.conf.d,profile.d}
for i in rpm/intel-{c-,comp-,compxe-,icc-,openmp-,openmp-common-}*.rpm; do
[[ "${i}" =~ 32bit|ifort ]] && continue
echo Extracting $(basename "${i}")...
bsdtar --extract --file="${i}" --directory=build
done
echo Creating symbolic links...
ln -sf "compilers_and_libraries_${__year}.${__update}.${__build}" "build/opt/intel/composerxe"
ln -sf "composerxe/linux/bin/intel64" "build/opt/intel/bin"
ln -sf "composerxe/linux/compiler/lib/intel64" "build/opt/intel/lib"
ln -sf "composerxe/linux/pkg_bin" "build/opt/intel/pkg_bin"
echo Amending scripts...
for i in build/opt/intel/composerxe/linux/bin/*.sh; do
sed -i 's/<INSTALLDIR>/\/opt\/intel\/composerxe\/linux/g' "${i}"
done
for i in build/opt/intel/composerxe/linux/bin/intel64/*.sh; do
sed -i 's/<INSTALLDIR>/\/opt\/intel\/composerxe\/linux/g' "${i}"
done
echo Installing configs...
install -Dt "build/etc/ld.so.conf.d" -m0644 ../intel-c-compiler.conf
install -Dt "build/etc/profile.d" -m0755 ../intel-c-compiler.sh
echo Installing man pages...
gzip "build/opt/intel/composerxe/linux/documentation/en/man/common/man1"/*.1
install -Dt "build/usr/share/man/man1" -m0644 "build/opt/intel/composerxe/linux/documentation/en/man/common/man1"/*.1.gz
echo Installing tricks...
mkdir -p "build/opt/intel/composerxe/linux/compiler/include/intel64"
touch "build/opt/intel/composerxe/linux/compiler/include/intel64/placeholder.h"
echo Removing garbage...
rm -f "build/opt/intel/composerxe/linux/bin/intel64"/*.csh
rm -f "build/opt/intel/composerxe/linux/bin"/*.csh
rm -f "build/opt/intel/composerxe/linux/man"
rm -f "build/opt/intel/composerxe/linux/documentation"
rm -rf "build/opt/intel/documentation_${__year}"
}
package() {
cd "${srcdir}/parallel_studio_xe_${__year}_update${__update}_composer_edition"
mv build/{etc,opt,usr} "${pkgdir}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment