diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-22 10:52:18 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-22 10:52:18 -0400 |
commit | 908d987dd1dcd4899f8f7f0878514c22ca8048b7 (patch) | |
tree | 29bf5986774207c3453044e1f370fb98d2431265 /pcr/yafaray-git/PKGBUILD | |
parent | 308bfb446305a96dffce945b6c4fb82b10d1b91b (diff) | |
parent | 8351d69e64a40d68fa32cfeea227b6fcf7afe974 (diff) |
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: |