#!/bin/sh # Built on TCL v3.5.1 # Required extensions: # squashfs-tools-4.x # tar # pyqt # sip # python # sqlite3 # openssl-0.9.8 # tk # tcl # Xorg-7.5-lib # libxft # fontconfig # expat2 # bzip2-lib # qt-4.x-xml # qt-4.x-base # glib2 # ispell # ncurses # ncurses-common getTime.sh installExtension() { if [ ! -e /usr/local/tce.installed/$1 ]; then echo "Installing "$1" ..." if [ -e $TCEDIR/optional/$1.tcz ]; then tce-load -i $1 else tce-load -wi $1 fi [ ! -e /usr/local/tce.installed/$1 ] && echo "Error: Extension "$1" not installed! Aborting" && exit fi } createExtension() { mksquashfs $1 $1.tcz -noappend [ ! -e $1.tcz ] && echo "Error: "$1".tcz not created! Aborting" && exit } unpackSrc() { #unpack source if [ -e $1.tar.bz2 ]; then tar -jxf $1.tar.bz2 elif [ -e $1.tb2 ]; then tar -jxf $1.tb2 elif [ -e $1.tbz ]; then tar -jxf $1.tbz elif [ -e $1.tar.gz ]; then tar -zxf $1.tar.gz elif [ -e $1.tgz ]; then tar -zxf $1.tgz elif [ -e $1.tar.xz ]; then tar -Jxf $1.tar.xz elif [ -e $1.txz ]; then tar -Jxf $1.txz elif [ -e $1.tar.lzma ]; then tar -xf $1.tar.lzma --lzma elif [ -e $1.tlz ]; then tar -xf $1.tlz --lzma else echo "Source "$1" not found! Aborting" && exit fi } # Install these extensions automagically export EXTS="squashfs-tools-4.x tar pyqt ispell" export TCEDIR=`cat /opt/.tce_dir` export CFLAGS="-march=i486 -mtune=i686 -Os -pipe" export CXXFLAGS=$CFLAGS" -fno-exceptions -fno-rtti" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig export EXTNAME="treeline" export VER="-1.4.0" export DESTDIR=`pwd`/$EXTNAME export PKGNAME="TreeLine" for f in $EXTS; do installExtension $f done unpackSrc $PKGNAME mkdir -p $DESTDIR/usr/local/share/applications $DESTDIR/usr/local/share/pixmaps cd $PKGNAME python install.py -b $DESTDIR cd $DESTDIR ln -s ../icons/$EXTNAME/tree/$EXTNAME.png usr/local/share/pixmaps/$EXTNAME.png echo '[Desktop Entry] Type=Application Name=TreeLine Comment=Structured Information Storage Icon=treeline Exec=treeline Terminal=false Categories=System;FileTools; X-FullPathIcon=/usr/local/share/pixmaps/treeline.png' > usr/local/share/applications/$EXTNAME.desktop cd .. createExtension $EXTNAME rm -rf $PKGNAME $EXTNAME # Create extension support files and test installExtension "submitqc" submitqc