Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKBUILD_Maya2013sp2

By: a guest on Nov 23rd, 2012  |  syntax: Bash  |  size: 4.77 KB  |  views: 119  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #Maintainer: Jedipottsy
  2. #Modified from zarathustra's maya2013trial package
  3.  
  4. pkgname=maya2013sp2
  5. pkgver=2013.0.0sp2
  6. pkgrel=2
  7. pkgdesc="3D Animation, Visual Effects, and Compositing Software"
  8. arch=('x86_64')
  9. url="http://www.autodesk.com/maya"
  10. license=('custom')
  11. depends=('libgl' 'mesa' \
  12.         'libxp' 'libxmu' 'libxpm' 'libxt' 'libxi' 'libxext' 'libx11' 'libxinerama' 'libxau' 'libxcb' \
  13.         'gamin' 'audiofile' 'e2fsprogs' 'glibc' 'zlib' 'libsm' 'libice' 'openssl' \
  14.         'tcsh' 'ttf-liberation' 'libpng12' 'libjpeg6' 'xorg-fonts-100dpi' 'xorg-fonts-75dpi' \
  15.         'libtiff3')
  16. optdepends=('maya2013-docs: html documentation reference'
  17.         'java-environment' 'python' 'gtk2' 'openal' 'qtwebkit')
  18. makedepends=('rpmextract')
  19. sha1sums=('c204619ed70313219a240a58b8fbcddc6fad3fbc'
  20. 'c204619ed70313219a240a58b8fbcddc6fad3fbc')
  21. options=('!strip')
  22. install=maya2013.install
  23.  
  24. build() {
  25.  
  26.   cd $srcdir
  27.  
  28.   #wget http://download.autodesk.com/us/maya/service_packs/Autodesk_Maya_2013_SP2_English_Linux_64bit.tgz
  29.  
  30.   echo "Extracting..."  
  31.   #With some tar/gunzip versions this will fail because auf a crc-Error. No Idea wy.
  32.  
  33.   tar -xvzf ${srcdir}/Autodesk_Maya_2013_SP2_English_Linux_64bit.tgz
  34.  
  35.   cd ${pkgdir}
  36.   rpmextract.sh ${srcdir}/adlmapps5-5.0.39-0.x86_64.rpm
  37.   rpmextract.sh ${srcdir}/adlmflexnetclient-5.0.39-0.x86_64.rpm
  38.   rpmextract.sh ${srcdir}/Maya2013_0_64-2013.0-350.x86_64.rpm
  39.  
  40.  
  41.  
  42.   install -Dm644 "${srcdir}/EULA/All Other Countries.txt" ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
  43.  
  44. }
  45.  
  46. package() {
  47.   echo "Creating /var/flexlm..."
  48.   # make sure /var/flexlm is world-writable.
  49.   mkdir -p ${pkgdir}/var/flexlm
  50.   chmod ugo+w ${pkgdir}/var/flexlm
  51.  
  52.   echo "Deleting maya directory if it's a link..."
  53.   # need to add links after install since you can't name links in the file list
  54.   if test -L ${pkgdir}/usr/autodesk/maya2013-x64; then
  55.       rm -f ${pkgdir}/usr/autodesk/maya2013-x64
  56.   fi
  57.  
  58.   echo "Linking the maya directory..."
  59.   # create the maya softlink if it doesn't exist
  60.   cd ${pkgdir}/usr/autodesk
  61.   ln -sf maya2013-x64 maya
  62.  
  63.   echo "Creating various binary links..."
  64.   # update various softlinks
  65.   cd ${pkgdir}/usr/autodesk/maya2013-x64/bin
  66.   ln -sf maya2013 maya
  67.   mkdir -p ${pkgdir}/usr/bin
  68.   ln -sf /usr/autodesk/maya2013-x64/bin/maya2013 ${pkgdir}/usr/bin/maya
  69.   ln -sf /usr/autodesk/maya2013-x64/bin/Render ${pkgdir}/usr/bin/Render
  70.   ln -sf /usr/autodesk/maya2013-x64/bin/fcheck ${pkgdir}/usr/bin/fcheck
  71.   ln -sf /usr/autodesk/maya2013-x64/bin/imgcvt ${pkgdir}/usr/bin/imgcvt
  72.  
  73.   # uncomment with 64-bit opa is available.
  74.   #ln -sf opa ${pkgdir}/usr/autodesk/maya2012/bin/apcw
  75.  
  76.   # links for pcw
  77.  
  78.   echo "Linking desktop files..."
  79.   # create softlinks for desktop
  80.   mkdir -p ${pkgdir}/usr/share/applications
  81.   ln -sf /usr/autodesk/maya2013-x64/desktop/Autodesk-Maya.desktop ${pkgdir}/usr/share/applications/Autodesk-Maya2013-x64.desktop
  82.   mkdir -p ${pkgdir}/usr/share/desktop-directories
  83.   ln -sf /usr/autodesk/maya2013-x64/desktop/Autodesk-Maya.directory ${pkgdir}/usr/share/desktop-directories/Autodesk-Maya2013-x64.directory
  84.   mkdir -p ${pkgdir}/usr/share/icons/hicolor/48x48/apps
  85.   ln -sf /usr/autodesk/maya2013-x64/desktop/Maya.png ${pkgdir}/usr/share/icons/hicolor/48x48/apps/Maya2013.png
  86.  
  87.   #cd ${pkgdir}/usr/autodesk/maya2013-x64/lib
  88.   # workaround the ssl dependency problem
  89.   echo "Linking openssl library..."
  90.   if ! [ -a ${pkgdir}/usr/autodesk/maya2013-x64/lib/libssl.so.6 ]
  91.   then
  92.     ln -s /usr/lib/libssl.so ${pkgdir}/usr/autodesk/maya2013-x64/lib/libssl.so.6
  93.     ln -s /usr/lib/libcrypto.so ${pkgdir}/usr/autodesk/maya2013-x64/lib/libcrypto.so.6
  94.   fi   
  95.  
  96.   # update the mental ray configuration files in place
  97.   #RPM_ESCAPED_PREFIX=`echo ${pkgdir}/usr | sed -e '/\//s/\//\\\\\//g'`
  98.  
  99.   #sed -e "/\[PREFIX\]/s//\/usr/" ${pkgdir}/usr/autodesk/maya2013-x64/mentalray/maya.rayrc > /tmp/maya.rayrc
  100.   #sed -e "/\[PREFIX\]/s//\/usr/" ${pkgdir}/usr/autodesk/maya2013-x64/bin/mayaexport_with_mr > /tmp/mayaexport_with_mr
  101.   #mv /tmp/maya.rayrc ${pkgdir}/usr/autodesk/maya2013-x64/mentalray/maya.rayrc
  102.   #mv /tmp/mayarender_with_mr ${pkgdir}/usr/autodesk/maya2013-x64/bin/mayarender_with_mr
  103.  
  104.  
  105.   #chmod 755 ${pkgdir}/usr/autodesk/maya2013-x64/bin/mayarender_with_mr > /dev/null 2>&1
  106.   echo "Creating the synergy file..."
  107.   instPath=/usr/autodesk/maya2013-x64/bin/maya
  108.   RPM_INSTALL_PATH=`echo ${instPath} | sed -e '/\//s/\//\\\\\//g'`
  109.   sed -e "/__EXECUTABLE_PATH__/s//${RPM_INSTALL_PATH}.bin\"\n      StartWrapperPath=\"${RPM_INSTALL_PATH}2012/" ${pkgdir}/opt/Autodesk/Synergy/Maya2013.2013.1.64.syncfg > ${pkgdir}/opt/Autodesk/Synergy/maya2013tmp.txt
  110.   mv ${pkgdir}/opt/Autodesk/Synergy/maya2013tmp.txt ${pkgdir}/opt/Autodesk/Synergy/Maya2013.2013.1.64.syncfg
  111.  
  112. echo "Creating the /usr/tmp directory..."
  113.   mkdir ${pkgdir}/usr/tmp
  114.   chmod 777 ${pkgdir}/usr/tmp
  115. }
clone this paste RAW Paste Data