#!/bin/sh
# Heavily based on the Slackware 10.2 SlackBuild
#
http://www.yafray.org/
# Packagers Gohanz (
gohanz@infinito.it)
#
http://www.slacky.it
# Need Scons to Compile.
CWD=`pwd`
if ["$TMP" = ""]; then
TMP=/tmp
fi
PKG=$TMP/package-yafray
NAME=yafray
VERSION=0.0.8
ARCH=${ARCH:-i686}
BUILD=1AS
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
mkdir -p $PKG
fi
cd $TMP
tar xvzf $CWD/$NAME-$VERSION.tar.gz
echo "+-------------------------------------+"
echo "| Starting SlackBuild $NAME-$VERSION |"
echo "+-------------------------------------+"
cd $NAME-$VERSION
chown -R root.root .
scons
scons install prefix=$PKG
mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a \
AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS README \
$PKG/usr/doc/$NAME-$VERSION
cd doc
cp -a \
* $PKG/usr/doc/$NAME-$VERSION
cd $CWD
cp -a *.SlackBuild slack-desc $PKG/usr/doc/$NAME-$VERSION
chown -R root.root $PKG/usr/doc/$NAME-$VERSION
mkdir -p $PKG/usr/bin
mkdir -p $PKG/usr/lib/yafray
mv $PKG/bin/yafray $PKG/usr/bin
rm -r $PKG/bin
mv $PKG/lib/*.so $PKG/usr/lib
mv $PKG/lib/yafray/* $PKG/usr/lib/yafray
rm -r $PKG/lib
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null
)
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
chown -R root.root $PKG/usr/doc/$NAME-$VERSION
chown -R root.bin $PKG/usr/bin
cd $PKG
requiredbuilder -y -v $PKG
makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/$NAME-$VERSION
rm -rf $PKG
fi
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
yafray: YafRay is a powerful raytracer, under the LGPL license.
yafray:
yafray: It enables you to create fantastic images and animations of a
yafray: photorealistic quality. Below can you find the most relevant features
yafray: which YafRay offers.
yafray:
yafray:
yafray:
yafray:
http://www.yafray.org/
yafray:
http://WWW.SLACKY.IT
yafray: PackaGer Gohanz.