From 84afef49fb98338992aa7fd00d86728fd44ddd9a Mon Sep 17 00:00:00 2001 From: Márcio Alexandre Silva Delgado Date: Fri, 8 Mar 2013 06:17:46 -0200 Subject: yafaray-git: updating pkg --- pcr/yafaray-git/PKGBUILD | 159 +++++++++++++++++++++++++++++++---------------- 1 file changed, 105 insertions(+), 54 deletions(-) (limited to 'pcr/yafaray-git/PKGBUILD') diff --git a/pcr/yafaray-git/PKGBUILD b/pcr/yafaray-git/PKGBUILD index 0c5d4f6e4..e60fe8324 100644 --- a/pcr/yafaray-git/PKGBUILD +++ b/pcr/yafaray-git/PKGBUILD @@ -1,78 +1,129 @@ -# Maintainer: Lukas Jirkovsky -# Maintainer (Parabola): Márcio Silva -pkgname=yafaray-git -_blendver=2.62 -pkgver=20120420 +# $Id$ +# Maintainer: Márcio Silva + +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') -url="http://www.yafaray.org/" -license=('LGPL2.1') -depends=('libxml2' 'openexr' 'libjpeg') -optdepends=('qt: QT GUI' 'python: Python bindings, Blender exporter') -makedepends=('cmake' 'git' 'qt' 'swig' 'python') -provides=('yafaray') -conflicts=('yafaray') -source=('gcc47.patch') -md5sums=('d99eb7db30885549687a8f7a775a582d') - -_gitroot=git://github.com/YafaRay/Core.git -_gitname=yafaray -_gitrootexport=git://github.com/YafaRay/Blender-2.5-Exporter.git +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...." + cd $srcdir + msg 'Connecting to GIT server....' # core - if [[ -d "$_gitname" ]]; then - cd "$_gitname" && git pull origin + if [[ -d $_gitname ]]; then + cd $_gitname && git pull origin cd .. - msg "The local files are updated." + msg 'The local files are updated.' else - git clone "$_gitroot" "$_gitname" + git clone $_gitroot $_gitname fi # exporter - if [[ -d "$_gitnameexport" ]]; then - cd "$_gitnameexport" && git pull origin + if [[ -d $_gitnameexport ]]; then + cd $_gitnameexport && git pull origin cd .. - msg "The local files are updated." + msg 'The local files are updated.' else - git clone "$_gitrootexport" "$_gitnameexport" + git clone $_gitrootexport $_gitnameexport fi - msg "GIT checkout done or server timeout" - msg "Starting build..." + msg 'GIT checkout done or server timeout' + msg 'Starting build...' - if [ -e "$srcdir"/$_gitname-build ]; then - rm -rf "$srcdir"/$_gitname-build + if [ -e $srcdir/$_gitname-build ]; then + rm -rf $srcdir/$_gitname-build fi - mkdir "$srcdir/$_gitname-build" + mkdir $srcdir/$_gitname-build + cd $srcdir/$_gitname-build - patch -Np0 -i "$srcdir/gcc47.patch" + setarch $CARCH cmake -DCMAKE_INSTALL_PREFIX=/usr\ + -DYAF_PY_VERSION=$_pyver\ + -DYAF_BINDINGS_PY_DIR=/usr/lib/python$_pyver\ + ../$_gitname - cd "$srcdir/$_gitname-build" + #-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 +} - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DYAF_PY_VERSION=3.2 \ - -DYAF_BINDINGS_PY_DIR=/usr/lib/python3.2 \ - "../$_gitname" - make +package_yafaray-git() { + cd $srcdir/$_gitname-build + setarch $CARCH make DESTDIR=$pkgdir install } -package() { - cd "$srcdir/$_gitname-build" - make DESTDIR="$pkgdir/" install - - # install exporter - cd "$srcdir/$_gitnameexport" - git checkout-index -a -f --prefix="$pkgdir/usr/share/blender/$_blendver/scripts/addons/yafaray/" - # create symlinks to make exporter fully work - install -d -m755 "$pkgdir/usr/share/blender/$_blendver/scripts/addons/yafaray/bin" - ln -sf "/usr/lib/libyafaraycore.so" "$pkgdir/usr/share/blender/$_blendver/scripts/addons/yafaray/bin/libyafaraycore.so" - ln -sf "/usr/lib/libyafarayplugin.so" "$pkgdir/usr/share/blender/$_blendver/scripts/addons/yafaray/bin/libyafarayplugin.so" - ln -sf "/usr/lib/yafaray" "$pkgdir/usr/share/blender/$_blendver/scripts/addons/yafaray/bin/plugins" +package_yafaray-blender-exporter-git() { + pkgver=$pkgver.v$_bldver + pkgdesc='YafaRay exporter for Blender' + arch=any + depends=( + $pkgbase=$pkgver + "blender>=$_bldepoch:$_bldver" + ) + provides=( + ${pkgname[1]%-$_pkgflag}=$_pkgver.v$_bldver + ) + conflicts=${pkgname[1]%-$_pkgflag} + + cd $srcdir/$_gitnameexport + + a=/usr/lib + b=usr/share/blender/$bldver/scripts/addon/$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: -- cgit v1.2.3