# To be able to run multiple DirectFB applications at once, you need to
# install the Fusion kernel module from CVS:
# http://www.directfb.org/index.php/viewcvs.cgi/linux-fusion/
# and you need to build DirectFB with --enable-multi. See the README for
# more info.
cd
test -f installed/DirectFB-1.0.1.tar.gz &&
mv installed/DirectFB-1.0.1.tar.gz .
test ! -f DirectFB-1.0.1.tar.gz &&
wget http://www.directfb.org/downloads/Core/DirectFB-1.0.1.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "DirectFB-*" -exec rm -r {} \;
tar xzvf ~/DirectFB-1.0.1.tar.gz
cd DirectFB-1.0.1
test $UID = 0 && chown -R root:root .
./configure
make
# Become root to install it
su
# Clean up files from old versions
test -d /usr/local/include/directfb && rm -r /usr/local/include/directfb
test -d /usr/local/include/directfb-internal &&
rm -r /usr/local/include/directfb-internal
( cd /usr/local/lib
rm -f libdirect.* libfusion.* libdirectfb.* libdirectfb-*.so.* )
find /usr/local/lib /usr/local/share -maxdepth 1 -type d \
-name "directfb-*" -exec rm -r {} \;
# Install it
make install
ldconfig
# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .