Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: jean_no on Sep 14th, 2011  |  syntax: None  |  size: 2.09 KB  |  views: 81  |  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: YOU <you@everywhere.com>
  2.  
  3. pkgname=blender-addons-yafaray-git
  4. pkgver=20110415
  5. pkgrel=1
  6. pkgdesc="Raytracing open source render engine"
  7. arch=('i686' 'x86_64')
  8. url="http://www.yafaray.org/"
  9. license=('LGPL2.1')
  10.  
  11. depends=('libxml2' 'openexr' 'libjpeg' 'libpng' 'freetype2' 'libtiff' 'python')
  12. makedepends=('cmake' 'swig' 'git')
  13.  
  14. provides=('yafaray')
  15. conflicts=('yafaray')
  16.  
  17. _gitroot=git://github.com/YafaRay/Core.git
  18. _gitname=yafaray
  19. _gitrootexport=git://github.com/YafaRay/Blender-2.5-Exporter.git
  20. _gitnameexport=exporter
  21. _slot="2.59"
  22.  
  23. build() {
  24.   cd ${srcdir}
  25.   msg "Connecting to GIT server...."
  26.  
  27.   # core
  28.   if [[ -d "${_gitname}" ]]; then
  29.     cd "${_gitname}" && git pull origin
  30.     cd ..
  31.     msg "The local files are updated."
  32.   else
  33.     git clone "${_gitroot}" "${_gitname}"
  34.   fi
  35.   # exporter
  36.   if [[ -d "${_gitnameexport}" ]]; then
  37.     cd "${_gitnameexport}" && git pull origin
  38.     cd ..
  39.     msg "The local files are updated."
  40.   else
  41.     git clone "${_gitrootexport}" "${_gitnameexport}"
  42.   fi
  43.  
  44.   msg "GIT checkout done or server timeout"
  45.   msg "Starting build..."
  46.  
  47.   if [ -e "${srcdir}"/${_gitname}-build ]; then
  48.       rm -rf "${srcdir}"/${_gitname}-build
  49.   fi
  50.   mkdir "${srcdir}/${_gitname}-build"
  51.   cd "${srcdir}/${_gitname}-build"
  52.  
  53.   cmake \
  54.     -DCMAKE_INSTALL_PREFIX=/usr/share/blender/${_slot}/scripts/addons/yafaray \
  55.     -DYAF_BINDINGS_PY_DIR=/usr/share/blender/${_slot}/scripts/addons/yafaray/bin \
  56.     -DWITH_QT=OFF \
  57.     -DBUILDRELEASE=ON \
  58.     -DYAF_LIB_DIR=bin \
  59.     -DYAF_PY_VERSION=3.2 \
  60.     "../${_gitname}"
  61.  
  62.   make $MAKEFLAGS
  63. }
  64.  
  65. package() {
  66.   cd "${srcdir}/${_gitname}-build"
  67.  
  68.   # Install
  69.   make DESTDIR=${pkgdir} install
  70.  
  71.   # Install plugins
  72.   mv ${pkgdir}/usr/share/blender/${_slot}/scripts/addons/yafaray/bin/yafaray \
  73.      ${pkgdir}/usr/share/blender/${_slot}/scripts/addons/yafaray/bin/plugins
  74.  
  75.   # install Exporter
  76.   cd "${srcdir}/${_gitnameexport}"
  77.   git checkout-index -a -f --prefix="${pkgdir}/usr/share/blender/${_slot}/scripts/addons/yafaray/"
  78.  
  79.   # Compile all .py
  80.   python -m compileall "${pkgdir}/usr/share/blender"
  81.  
  82. }