How to build blender-svn package for paldo

From Paldo

(Difference between revisions)
Jump to: navigation, search

Amnon82 (Talk | contribs)
(New page: Image:Blender-svn.png ''Tutorial by Philip Müller'' ==About blender== Blender is a free 3D graphics application. It can be used for modeling, UV unwrapping, texturing, rigging, wate...)
Next diff →

Revision as of 01:46, 27 October 2008

Image:Blender-svn.png Tutorial by Philip Müller

Contents

About blender

Blender is a free 3D graphics application. It can be used for modeling, UV unwrapping, texturing, rigging, water simulations, skinning, animating, rendering, particle and other simulations, non-linear editing, compositing, and creating interactive 3D applications. Blender is available for several operating systems, including Microsoft Windows, Mac OS X, Linux, IRIX, Solaris, NetBSD, FreeBSD, OpenBSD with unofficial ports for BeOS, SkyOS, AmigaOS, MorphOS and Pocket PC. Blender has a robust feature set similar in scope and depth to other high-end 3D software such as Softimage|XSI, Cinema 4D, 3ds Max, Lightwave and Maya. These features include advanced simulation tools such as rigid body, fluid, cloth and softbody dynamics, modifier based modeling tools, powerful character animation tools, a node based material and compositing system and Python for embedded scripting.

Why creating svn-tarballs?

Well, every program needs time to get stable. SVN isn't always the best thing to use as a normal user, but sometimes the SVN-versions support features the actual release don't has. Using SVN-software is a risk too. Nobody can tell you for shure it will work. It is coding in progress. So if you want to experiment with new software this tutorial is right for you. And with paldo it is easy as it can get!

Create the tarball

Open a terminal and do this cmd:

 $ svn co 

You'll asked to accept the key of the server. Press the p-button on your keyboard. Wait till all files are downloaded and remember the SVN number:

  A    blender/po/el.po
  A    blender/po/Makefile
  A    blender/po/zh_CN.po
  U   blender
 Checked out revision 17199.

Do a export of the SVN to get a clean ground for a tarball:

 $ svn export blender blender-svn-r17199

Create a tarball:

 $ tar cfvj blender-svn-r17199.tar.bz2 blender-svn-r17199

Create local repository

Create a local repo for paldo:

 $ mkdir -p spec "sources/blender"

Move tarball to the blender dir:

 $ mv blender-svn-r17199.tar.bz2 sources/blender

Create the spec

You can use this spec for your blender build:

blender.xml

Edit if needed:

  <release version="2.48a-svn-r17199-20081027" revision="1" branch="testing">
    	<deps>
 		<dep name="x11"/>
 		<dep name="xext"/>
 		<dep name="xxf86vm"/>
 		<dep name="freetype"/>
 		<dep name="SDL"/>
 		<dep name="Python"/>
 		<dep name="jpeg"/>
 		<dep name="libpng"/>
 
 		<dep name="zlib"/>
 		<dep name="openal"/>
 		<dep name="scons"/>
 		<dep name="freealut"/>
 		<dep name="openexr"/>
 		<dep name="ffmpeg"/>
 		<dep name="gettext"/>
 		<dep name="mesa"/>
 	</deps>
 	<build>
 		<script>
 			<archive name="blender-$VERSION">
 				<cmd>scons -j 2 BF_PYTHON_VERSION=2.5 BF_BUILDDIR=blender-build BF_INSTALLDIR=blender-install WITH_BF_GAMEENGINE=true</cmd>
 				<cmd>install -D -m 755 blender-install/blender /usr/bin/blender-bin</cmd>
 				<cmd>mkdir -p /usr/lib/blender</cmd>
 				<cmd>cp -a blender-install/.blender/{locale,scripts} blender-install/plugins /usr/lib/blender</cmd>
   
 				<cmd>install -m 644 blender-install/.blender/.Blanguages /usr/lib/blender</cmd>
 				<cmd>install -m 644 blender-install/.blender/.bfont.ttf /usr/lib/blender</cmd>
 				<cmd check="no">cat > /usr/share/applications/blender.desktop << "EOF"
 [Desktop Entry]
 Name=Blender 3D Modeller
 Comment=Create and edit 3D models and animations
 Exec=blender
 Icon=blender
 Terminal=false
 Type=Application
 Categories=Application;Graphics;
 StartupNotify=false
 MimeType=application/x-blender;
 EOF</cmd>
 				<cmd>install -D release/freedesktop/icons/scalable/blender.svg /usr/share/pixmaps/blender.svg</cmd>
   						
 				
   
 				<text dest="/usr/bin/blender" mode="755"><![CDATA[#!/bin/sh
 # wrapper-script by Amnon82 - v1.1
 
 # check if ~/.blender dir exists
 if  [ -f ~/.blender/scripts/scripts-$VERSION-$REVISION.installed ] ; then
   #if yes run blender direct
   echo start blender directly
   blender-bin
 else
  #else create folder and copy the scripts to users home-dir
  echo copying scripts to home dir
  mkdir -p ~/.blender/scripts
  #remove any existing previous scripts
  echo removing scripts of previous blender install
  rm -rf ~/.blender/scripts/*
  cp /usr/lib/blender/scripts/* ~/.blender/scripts
  echo "blender scripts of blender-$VERSION-$REVISION installed" >> ~/.blender/scripts/scripts-$VERSION-$REVISION.installed
  echo start blender
  blender-bin
 fi
 ]]></text>
 			</archive>
 		</script>
 	</build>
 </release>

Add the local repo

Now you have to add your local repo to your /etc/upkg.conf-file:

$ pwd
/home/amnon/local_repo/
$ sudo sed -i -e 's%<repositories>%&\n<repository>/PATH/TO/YOUR/LOCAL_REPO/</repository>%' /etc/upkg.conf

Build blender-svn package

Then you can build your new package with upkg:

$ sudo upkg-build --verbose blender

You can start blender with

$ blender

Have fun with the latest blender version.

Personal tools