diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-07 00:46:34 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-07 00:46:34 -0400 |
commit | 619b8d955269f2fe74386e98fac07675c8b55352 (patch) | |
tree | f3e2610a39c99a7e43bc2b345280b04e398b986a /pcr/yafaray-git/PKGBUILD | |
parent | 2b04539ac9310541a4e563460aed0cb7715770d2 (diff) | |
parent | 7d4e98b2d6f2fd4d42ebb55105bab8a05e34ab94 (diff) | |
download | abslibre-619b8d955269f2fe74386e98fac07675c8b55352.tar.gz abslibre-619b8d955269f2fe74386e98fac07675c8b55352.tar.bz2 abslibre-619b8d955269f2fe74386e98fac07675c8b55352.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/yafaray-git/PKGBUILD')
-rw-r--r-- | pcr/yafaray-git/PKGBUILD | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/pcr/yafaray-git/PKGBUILD b/pcr/yafaray-git/PKGBUILD new file mode 100644 index 000000000..22465488c --- /dev/null +++ b/pcr/yafaray-git/PKGBUILD @@ -0,0 +1,130 @@ +# $Id$ +# Maintainer: Márcio Silva <coadde@lavabit.com> + +pkgbase=yafaray +pkgname=( + yafaray-git + yafaray-blender-exporter-git +) +_pkgflag=git +pkgver=$(LC_ALL=C date -u +%Y%m%d) +_pkgver=1.2 +_bldver=2.66 +_bldepoch=6 +_pyver=3.3 +pkgrel=1 +pkgdesc='A libre software raytracing engine' +arch=( + i686 + x86_64 + mips64el +) +url="http://www.$pkgbase.org" +license=LGPL2.1 +depends=( + freetype2 + libjpeg + libxml2 + openexr +) +optdepends=( + 'python: Python bindings' + 'qt4: QT GUI' + #'ruby: Ruby bindings' + 'yafaray-blender-exporter-git: Blender exporter' +) +makedepends=( + cmake + git + python + qt4 + #ruby-headers + swig +) +provides=( + $pkgbase=$_pkgver +) +conflicts=$pkgbase + +_gitroot="https://github.com/YafaRay/Core.git" +_gitname=$pkgbase +_gitrootexport="https://github.com/YafaRay/Blender-Exporter.git" +_gitnameexport=exporter + +build() { + cd $srcdir + msg 'Connecting to GIT server....' + + # core + if [[ -d $_gitname ]]; then + cd $_gitname && git pull origin + cd .. + msg 'The local files are updated.' + else + git clone $_gitroot $_gitname + fi + # exporter + if [[ -d $_gitnameexport ]]; then + cd $_gitnameexport && git pull origin + cd .. + msg 'The local files are updated.' + else + git clone $_gitrootexport $_gitnameexport + fi + + msg 'GIT checkout done or server timeout' + msg 'Starting build...' + + if [ -e $srcdir/$_gitname-build ]; then + rm -rf $srcdir/$_gitname-build + fi + mkdir $srcdir/$_gitname-build + cd $srcdir/$_gitname-build + + setarch $CARCH cmake -DCMAKE_INSTALL_PREFIX=/usr\ + -DYAF_PY_VERSION=$_pyver\ + -DYAF_BINDINGS_PY_DIR=/usr/lib/python$_pyver\ + ../$_gitname + + #-DWITH_YAF_PY_BINDINGS=ON\ + #-DBLENDER_ADDON=ON\ + #-DBLENDER_EXPORTER_BRANCH=master\ + #-DWITH_YAF_RUBY_BINDINGS=ON\ + #-DYAF_USER_INCLUDE_DIRS=/usr/include/ruby-1.9.1/$CARCH-linux\ + + setarch $CARCH make +} + +package_yafaray-git() { + cd $srcdir/$_gitname-build + setarch $CARCH make DESTDIR=$pkgdir install +} + +package_yafaray-blender-exporter-git() { + pkgver=$pkgver.v$_bldver + pkgdesc='YafaRay exporter for Blender' + arch=any + depends=( + ${pkgname[0]}=$pkgver + "blender>=$_bldepoch:$_bldver" + ) + optdepends="" + provides=( + ${pkgname[1]%-$_pkgflag}=$_pkgver.v$_bldver + ) + conflicts=${pkgname[1]%-$_pkgflag} + + cd $srcdir/$_gitnameexport + + a=/usr/lib + b=usr/share/blender/$_bldver/scripts/addons/$pkgbase/bin + + git checkout-index -a -f --prefix=$pkgdir/${b%bin} + + install -d -m755 $pkgdir/$b + ln -sf $a/lib${pkgbase}core.so $pkgdir/$b/lib${pkgbase}core.so + ln -sf $a/lib${pkgbase}plugin.so $pkgdir/$b/lib${pkgbase}plugin.so + ln -sf $a/$pkgbase $pkgdir/$b/plugins +} + +# vim:set ts=2 sw=2 et: |