updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / eclipse-icc / PKGBUILD
blobf797af587a6c7f5e186a7949121b5244bc011ec6
1 # Contributor: Nicolas Bigaouette <nbigaouette@gmail.com>
3 pkgname=eclipse-icc
4 _comp=c
5 pkgver=10.0.026
6 _urlnumber=786
7 pkgrel=1
8 pkgdesc="The Intel C/C++ Compiler integration into Eclipse"
9 url="http://www3.intel.com/cd/software/products/asmo-na/eng/compilers/clin/277618.htm"
10 arch=('i686' 'x86_64')
11 license=('custom')
12 depends=("glibc" "libstdc++5" "icc=${pkgver}" "eclipse")
13 makedepends=(rpmextract)
14 if [ "$CARCH" = "i686" ]; then
15         _intel_arch=i386
16         _intel_64char=
17 else
18         _intel_arch=em64t
19         _intel_64char=e
21 source=(http://registrationcenter-download.intel.com/irc_nas/${_urlnumber}/l_${_comp}c_c_${pkgver}_ia32.tar.gz license.txt)
22 md5sums=('e8f98099af55d41d683d8a037a6dbac7'
23          '1034f17e98a8affd04f91082b0114b03')
25 build() {
26         _intel_arch_file=`basename ${source[0]}`
27         _intel_arch_file=${_intel_arch_file/.tar.gz/}
28         _intel_arch_file=${_intel_arch_file##*_}
29         _compiler=${source[0]#*l_}
30         _compiler=${_compiler%%_*}
31         _comp_ver=`echo $source[0] | sed -e "s|.*/l_${_compiler}_||g" -e "s|_${pkgver}.*||g"`
33         _major_version=${pkgver%%.*}
34         _build_version=${pkgver##*.}
35         _minor_version=`echo ${pkgver} | sed -e "s/${_major_version}.//g" -e "s/.${_build_version}//g"`
37         mkdir -p $startdir/src/unpacked
38         cd $startdir/src/unpacked
40         rpmextract.sh ../l_${_compiler}_${_comp_ver}_${pkgver}_${_intel_arch_file}/data/intel-icc_ide*.rpm &> /dev/null || return 1
42         find $startdir/src/unpacked -type d -exec chmod 755 {} \; || return 1
43         mkdir -p $startdir/pkg/opt/eclipse
44         mv $startdir/src/unpacked/opt/intel/cc/$pkgver/eclipse $startdir/pkg/opt
45         rm -fr $startdir/pkg/intel
47         install -D -m 644 $startdir/src/license.txt $startdir/pkg/usr/share/licenses/$pkgname/license.txt