#!/bin/sh echo "Don't forget to update this script with the change-log! Press ENTER to start..." read NAME="expect" VERSION="5.44.1.15" SOURCE="http://sourceforge.net/projects/expect/files/Expect/$VERSION/expect-$VERSION.tar.gz" CONFIGURE="--prefix=/usr/local --with-tcl=/usr/local/lib --with-tclinclude=/usr/local/include --enable-shared" DATE=`date '+%Y/%m/%d'` export CFLAGS="-march=i486 -mtune=i686 -Os -pipe" export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe" export LDFLAGS="-Wl,-O1" echo "Downloading essential packages..." tce-load -wi compiletc autoconf tcl tcl-dev squashfs-tools-4.x cd /tmp/ wget $SOURCE sudo rm -rf $NAME-$VERSION 2>/dev/null sudo rm /tmp/$NAME.tcz /tmp/$NAME.tcz.list /tmp/$NAME.tcz.md5.txt /tmp/$NAME.tcz.dep 2>/dev/null sudo rm -rf /tmp/$NAME 2>/dev/null tar xvfz $NAME-$VERSION.tar.gz cd $NAME-$VERSION wget http://patches.cross-lfs.org/dev/expect-5.44.1.15-notk-1.patch ################################ echo " Check source BEFORE patching: (grep should find 2 matches): " grep -c "@TK_INCLUDES@" Makefile.in grep -c "TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC" configure echo "Press ENTER to continue..." read patch -Np1 -i expect-5.44.1.15-notk-1.patch echo " Check source AFTER patching: (grep should NOT find any matches): " grep -c "@TK_INCLUDES@" Makefile.in grep -c "TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC" configure echo "Press ENTER to continue..." read ################################ echo " Starting ./configure $CONFIGURE" ./configure $CONFIGURE echo "Press ENTER to continue... " read make -j3 echo " Starting make install to: /tmp/$NAME" sudo make SCRIPTS="" DESTDIR=/tmp/$NAME install cd /tmp/$NAME sudo find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null sudo find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null mkdir -p /tmp/$NAME-doc/usr/local/share/man/man1 mkdir -p /tmp/$NAME-doc/usr/local/share/man/man3 sudo mv /tmp/$NAME/usr/local/man/man1/expect.1 /tmp/$NAME-doc/usr/local/share/man/man1/expect.1 sudo mv /tmp/$NAME/usr/local/man/man3/libexpect.3 /tmp/$NAME-doc/usr/local/share/man/man3/libexpect.3 sudo rm -rf /tmp/$NAME/usr/local/man cd /tmp/ sudo mksquashfs $NAME $NAME.tcz sudo md5sum $NAME.tcz > $NAME.tcz.md5.txt cd $NAME sudo find usr -not -type d > ../$NAME.tcz.list cd /tmp/ SIZE="`du -k $NAME.tcz|cut -f1`k" sudo echo "Title: $NAME.tcz Description: Expect + noTk patch Version: $VERSION Author: Don Libes, National Institute of Standards and Technology Original-site: http://expect.sourceforge.net/ Copying-policy: Public Domain Size: $SIZE Extension_by: andriscom Comments: Expect automates interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. It is also useful for testing these same applications. Expect can make easy all sorts of tasks that are prohibitively difficult with anything else. You will find that Expect is an absolutely invaluable tool - using it, you will be able to automate tasks that you've never even thought of before. The following patch was applied: http://patches.cross-lfs.org/dev/expect-5.44.1.15-notk-1.patch Built with CFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with CXXFLAGS: -march=i486 -mtune=i686 -Os -pipe Built with LDFLAGS: -Wl,-O1 Built with the following options: ./configure $CONFIGURE Example scipts are NOT in this package. For man entries you can visit: http://linux.die.net/man/1/expect Source: $SOURCE Change-log: $DATE Version: $VERSION Current: $DATE Version: $VERSION " > $NAME.tcz.info sudo echo "tcl.tcz " > $NAME.tcz.dep echo "Creating package..." cd /tmp/ sudo mksquashfs $NAME-doc $NAME-doc.tcz sudo md5sum $NAME-doc.tcz > $NAME-doc.tcz.md5.txt cd $NAME-doc sudo find usr -not -type d > ../$NAME-doc.tcz.list cd /tmp/ SIZE="`du -k $NAME-doc.tcz|cut -f1`k" sudo echo "Title: $NAME-doc.tcz Description: Expect man pages Version: $VERSION Author: Don Libes, National Institute of Standards and Technology Original-site: http://expect.sourceforge.net/ Copying-policy: Public Domain Size: $SIZE Extension_by: andriscom Comments: Manual entry files for expect $VERSION. Source: $SOURCE Change-log: $DATE Version: $VERSION Current: $DATE Version: $VERSION " > $NAME-doc.tcz.info cd /tmp/ mkdir packages 2>/dev/null sudo rm packages/$NAME.tar.gz 2>/dev/null sudo rm packages/$NAME-doc.tar.gz 2>/dev/null tar zcf packages/$NAME.tar.gz $NAME.tcz* tar zcf packages/$NAME-doc.tar.gz $NAME-doc.tcz* echo " Run bcrypt on /tmp/packages/*.tar.gz... give password: tinycore" echo "Run the extension_audit.sh and reboot a clean system to try the packages!" echo "Send it to: tcesubmit@gmail.com"