#!/bin/sh # Built on TCL v3.3 # Required extensions: # compiletc # binutils # base-dev # bison # diffutils # file # findutils # flex # gawk # gcc # gcc_libs # cloog # ppl # gmp # mpfr # gperf # grep # m4 # make # patch # pkg-config # sed # squashfs-tools-4.x # tar # intltool # perl_xml_parser # perl5 # expat2 # gettext # ncurses # ncurses-common # python # sqlite3 # openssl-0.9.8 # tk # tcl # Xorg-7.5-lib # libxft # fontconfig # bzip2-lib 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 } # Install these extensions automagically export EXTS="compiletc squashfs-tools-4.x tar intltool python" 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="cdemu-client" export VER="-1.3.0" export DESTDIR=`pwd`/$EXTNAME export PKGNAME=$EXTNAME$VER for f in $EXTS; do installExtension $f done #unpack source if [ -e $PKGNAME.tar.bz2 ]; then tar -jxf $PKGNAME.tar.bz2 elif [ -e $PKGNAME.tb2 ]; then tar -jxf $PKGNAME.tb2 elif [ -e $PKGNAME.tbz ]; then tar -jxf $PKGNAME.tbz elif [ -e $PKGNAME.tar.gz ]; then tar -zxf $PKGNAME.tar.gz elif [ -e $PKGNAME.tgz ]; then tar -zxf $PKGNAME.tgz elif [ -e $PKGNAME.tar.xz ]; then tar -Jxf $PKGNAME.tar.xz elif [ -e $PKGNAME.txz ]; then tar -Jxf $PKGNAME.txz elif [ -e $PKGNAME.tar.lzma ]; then tar -xf $PKGNAME.tar.lzma --lzma elif [ -e $PKGNAME.tlz ]; then tar -xf $PKGNAME.tlz --lzma else echo "Source tarball not found! Aborting" && exit fi mkdir -p $DESTDIR-locale/usr/local cd $PKGNAME ./configure && make && make install-strip || exit cd $DESTDIR rm -rf usr/local/share/man mv usr/local/share $DESTDIR-locale/usr/local find usr -not -type d > ../$EXTNAME.tcz.list cd $DESTDIR-locale find usr -not -type d > ../$EXTNAME-locale.tcz.list cd .. mksquashfs $EXTNAME $EXTNAME.tcz -noappend md5sum $EXTNAME.tcz > $EXTNAME.tcz.md5.txt mksquashfs $EXTNAME-locale $EXTNAME-locale.tcz -noappend md5sum $EXTNAME-locale.tcz > $EXTNAME-locale.tcz.md5.txt rm -rf $PKGNAME $EXTNAME $EXTNAME-locale