SHARE
TWEET

Modified Houdini PKGBUILD

lunarscum Dec 13th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Ashley Whetter <(firstname) at awhetter couk>
  2.  
  3. # Note: You will need to start the sesinetd service before running houdini
  4. # Note: You may want to add /opt/houdini/bin to your PATH
  5.  
  6. pkgname=('houdini' 'houdini-maya-engine' 'houdini-unity-engine' 'python2-hqueue')
  7. pkgbase=houdini
  8. _pkgver_major=17
  9. _pkgver_minor=5
  10. _pkgver_build=425
  11. pkgver=${_pkgver_major}.${_pkgver_minor}.${_pkgver_build}
  12. pkgrel=1
  13. pkgdesc="High-end 3D animation package"
  14. arch=('x86_64')
  15. url="http://www.sidefx.com/"
  16. license=('Custom: Side Effects Software')
  17. depends=()
  18. makedepends=()
  19. options=('!strip')
  20.  
  21. _gccver=$(gcc -dumpversion)
  22. _gccver=${_gccver%.[0-9]*}
  23. _validgccs=(6.3)
  24. # Use the latest gcc version available if there isn't a known version installed
  25. [[ ${_validgccs[@]} =~ $_gccver ]] || _gccver=${_validgccs[@]:(-1)}
  26.  
  27. # The file needs to be downloaded manually
  28. source=(file://${pkgname}-${pkgver}-linux_x86_64_gcc${_gccver}.tar.gz)
  29. [[ "$_gccver" == 6.3 ]] && sha1sums=('d7339e0ba0c50e9e786c34de6d52c41e2ad0d81e')
  30.  
  31. source+=('LICENSE' 'sesinetd.service')
  32. sha1sums+=('25317e6850d453e86f8bc868efe1ef95f81a2174' 'b6eca8f67aeedb9c5b7a5863c3d24edaf2b93cf3')
  33.  
  34. _install_houdini_file() {
  35.     # From installDesktopItems.py:__installHoudiniFile
  36.     src="$1"
  37.     dest="$2"
  38.     sed -i '
  39.     s|${HFS}|/opt/houdini|g
  40.     s|${VER_MAJOR}|'${_pkgver_major}'|g
  41.     s|${VER_MINOR}|'${_pkgver_minor}'|g
  42.     ' "$src"
  43.     install -Dm644 "$src" "$dest"
  44. }
  45.  
  46. package_houdini() {
  47.     depends=(
  48.     'expat' 'fontconfig' 'glu' 'icu' 'libx11' 'libglvnd' 'ocl-icd'
  49.     )
  50.     optdepeds=(
  51.     'alsa-lib: Audio support'
  52.     'ilmbase: OpenEXR file format support'
  53.     )
  54.  
  55.     cd ${srcdir}
  56.     tar xzf houdini-${pkgver}-linux_x86_64_gcc${_gccver}.tar.gz
  57.     cd houdini-${pkgver}-linux_x86_64_gcc${_gccver}
  58.  
  59.     install -d ${pkgdir}/opt/houdini
  60.     tar xzf houdini.tar.gz -C ${pkgdir}/opt/houdini
  61.  
  62.     install -d ${pkgdir}/opt/houdini/python
  63.     tar xzf pythonlibdeps.tar.gz -C ${pkgdir}/opt/houdini/python
  64.     tar xzf python2.7.tar.gz -C ${pkgdir}/opt/houdini/python
  65.  
  66.     for i in {gplay,hkey,houdini,houdinifx,houdinicore,hindie,mplay,hview,happrentice,orbolt_url};
  67.     do
  68.         _install_houdini_file desktop/sesi_${i}.desktop ${pkgdir}/usr/share/applications/sesi_${i}.desktop
  69.     done
  70.  
  71.     _install_houdini_file desktop/sesi_houdini.menu ${pkgdir}/etc/xdg/menus/applications-merged/sesi_houdini.menu
  72.  
  73.     _install_houdini_file desktop/sesi_houdini.menu ${pkgdir}/etc/xdg/menus/kde-applications-merged/sesi_houdini.menu
  74.  
  75.     for i in {hip,hiplc,hipnc,otl,otllc,otlnc,hda,hdalc,hdanc,pic,piclc,picnc,geo,bgeo,orbolt}
  76.     do
  77.         _install_houdini_file "mime/application-x-${i}.xml" "${pkgdir}/usr/share/mime/packages/application-x-${i}.xml"
  78.     done
  79.  
  80.     # installing license
  81.     install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
  82.  
  83.     install -Dm644 ${srcdir}/sesinetd.service ${pkgdir}/usr/lib/systemd/system/sesinetd.service
  84. }
  85.  
  86. package_houdini-maya-engine() {
  87.     url="https://www.sidefx.com/products/houdini-engine/maya-plug-in/"
  88.     depends=("houdini=$pkgver")
  89.  
  90.     cd ${srcdir}/houdini-${pkgver}-linux_x86_64_gcc${_gccver}
  91.  
  92.     install -d ${pkgdir}/opt/houdini/engine/maya
  93.     tar xzf engine_maya.tar.gz -C ${pkgdir}/opt/houdini/engine/maya
  94.  
  95.     sed -i -e 's|REPLACE_WITH_HFS|/opt/houdini|' \
  96.         $(find "${pkgdir}/opt/houdini/engine/maya" -mindepth 2 -maxdepth 2 -type f -name "houdiniEngine-*")
  97.  
  98.     for maya_version in {2014,2015,2016,2016.5,2017,2018}
  99.     do
  100.         if [[ $maya_version == 2014 || $maya_version == 2015 ]]
  101.         then
  102.             maya_dir="${pkgdir}/usr/autodesk/maya${maya_version}-x64"
  103.         else
  104.             maya_dir="${pkgdir}/usr/autodesk/maya${maya_version}"
  105.         fi
  106.         module_dir="${maya_dir}/modules"
  107.         install -d "$module_dir"
  108.         cp ${pkgdir}/opt/houdini/engine/maya/maya${maya_version}/houdiniEngine-maya${maya_version} "$module_dir"
  109.     done
  110.  
  111.     install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  112. }
  113.  
  114. package_houdini-unity-engine() {
  115.     url="https://www.sidefx.com/products/houdini-engine/unity-plug-in/"
  116.     depends=("houdini=$pkgver")
  117.  
  118.     cd ${srcdir}/houdini-${pkgver}-linux_x86_64_gcc${_gccver}
  119.  
  120.     install -d ${pkgdir}/opt/houdini/engine/unity
  121.     tar xzf engine_unity.tar.gz -C ${pkgdir}/opt/houdini/engine/unity
  122.  
  123.     install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  124. }
  125.  
  126. package_python2-hqueue() {
  127.     depends=('mysql' 'python2>=2.7' 'python2-beaker' 'python2-decorator' 'python2-formencode' 'python2-mako' 'python2-nose' 'python2-paramiko' 'python2-paste' 'python2-paste-deploy' 'python2-paste-script' 'python2-crypto' 'python2-pycurl' 'python2-pygments' 'python2-pylons' 'python2-routes' 'python2-rpyc' 'python2-setuptools' 'python2-simplejson' 'python2-sqlalchemy' 'python2-tempita' 'python2-virtualenv' 'python2-weberror' 'python2-webhelpers' 'python2-webob' 'python2-webtest' 'python2-wsgiref')
  128.  
  129.     cd ${srcdir}/houdini-${pkgver}-linux_x86_64_gcc${_gccver}
  130.     tar xzf hqueue.tar.gz
  131.  
  132.     for file in {hqserverd,create_shared_drive.sh}
  133.     do
  134.         install -Dm755 hqueue/scripts/$file ${pkgdir}/opt/hqueue/scripts/$file
  135.     done
  136.  
  137.     sed -i -e 's|%%INSTALL_DIR%%|/opt/hqueue|' ${pkgdir}/opt/hqueue/scripts/hqserverd
  138.  
  139.     # TODO: hqueue/deps/indep/*
  140.     # TODO: Convert hqueue/scripts/hqserverd to systemd unit
  141.     install -d ${pkgdir}/usr/lib/python2.7/site-packages
  142.     install -Dm644 hqueue/hqserver-${pkgver}-py2.7.egg ${pkgdir}/usr/lib/python2.7/site-packages
  143.     echo ./hqserver-${pkgver}-py2.7.egg >> ${pkgdir}/usr/lib/python2.7/site-packages/hqserver.pth
  144. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top