#!/bin/sh #(c)2004 Barry Kauler, www.goosee.com/puppy #eighth script to create Puppy Linux image.gz PUPPYDIR="`pwd`" #/root/puppy SOURCESDIR="$PUPPYDIR/sources7" DESTDIR="$PUPPYDIR/rootfs-complete" FSSIZE=`cat $PUPPYDIR/rootfs-skeleton/root0/.etc/ramdisksize` echo "Files failed to strip:" > $SOURCESDIR/logstriperr.txt binstripfunc() { #param passed in is full path and filename, no wildchars allowed. #note, do not put quotes around the $1, fails if asterisks if [ ! -h $1 ];then #-h test if symbolic link. strip --strip-unneeded $1 > /dev/null 2>&1 if [ ! $? -eq 0 ];then echo "$1" >> $SOURCESDIR/logstriperr.txt fi fi } libstripfunc() { #param passed in is full path and filename, no wildchars allowed. #note, do not put quotes around the $1, fails if asterisks #WARNING: do not strip all symbols, as this script strips some #lib files at their source, in the host system. if [ ! -h $1 ];then #-h test if symbolic link. strip --strip-debug $1 > /dev/null 2>&1 if [ ! $? -eq 0 ];then echo "$1" >> $SOURCESDIR/logstriperr.txt fi fi } check_status() { /bin/echo -en "\\033[65G" if [ $1 -eq 0 ] then /bin/echo -en "\\033[1;32mdone" else /bin/echo -en "\\033[1;31mfailed" FLAGFAILED=1 fi /bin/echo -e "\\033[0;39m" } skip_key() { if [ "$FIRSTTIME" = "yes" ];then echo -n "Press ENTER to continue (and compile/install $1): " read mmm nnn="y" else echo -en "To compile/install $1, press \"y\", else \"ENTER\" to skip: " read nnn fi } echo echo -e "Would you like to cleanup sources7/ folder by running \"make clean\"" echo -e "or \"make distclean\" in all the packages? This will remove all the" echo "configuration and compiled files. You probably only want to do this" echo "if you want to make everything into a tarball for distribution, or" echo " you need to save space on the drive." echo -e "This script will cleanup then exit if you choose \"y\"." echo -ne "Press \"y\" to clean sources7/, anything else not to: " read mmm if [ "$mmm" = "y" ];then echo "Please wait..." cd $PUPPYDIR/sources7/Gequel cd Gtk1.2 make distclean &>/dev/null rm -f log*.txt &>/dev/null #cd $PUPPYDIR/sources7/libicq-0.33 #make clean &>/dev/null #rm -f log*.txt &>/dev/null #cd $PUPPYDIR/sources7/gicq-0.33 #make distclean &>/dev/null #rm -f log*.txt &>/dev/null cd $PUPPYDIR/sources7/gtimer-1.1.6 make distclean &>/dev/null rm -f log*.txt &>/dev/null # cd $PUPPYDIR/sources7/gtkdiskfree-1.8.4 # make distclean &>/dev/null # cd $PUPPYDIR/sources7/gtksshlogin # make clean &>/dev/null # rm -f log*.txt &>/dev/null cd $PUPPYDIR/sources7/ssh-gui-0.7.1 make clean &>/dev/null rm -f log*.txt &>/dev/null cd $PUPPYDIR/sources7/knowde make clean &>/dev/null rm -f log*.txt &>/dev/null cd $PUPPYDIR/sources7/LinPopUp-1.2.0/src make clean &>/dev/null rm -f log*.txt &>/dev/null cd $PUPPYDIR/sources7/metamail-2.7/metamail make clean &>/dev/null rm -f log*.txt &>/dev/null sync echo "...cleaned sources6/ folder. Exiting script..." exit fi echo echo "Do you want to recompile everything in sources7/ folder and install" echo "into rootfs-complete/ folder?" echo "If you just press ENTER, you will asked about each package, whether" echo "you want to compile and install it." echo "IF THIS IS THE VERY FIRST TIME THAT YOU ARE RUNNING THIS SCRIPT," echo -e "YOU MUST TYPE \"y\" TO BUILD EVERYTHING!" echo echo -en "Type \"y\" for everything or just press ENTER only for no: " read nnn if [ "$nnn" ];then FIRSTTIME="yes" cd $PUPPYDIR fi echo echo "Note, gequel compile needs the libmysql12-devel package installed, which" echo "also installs libmysql, mysql-client and mysql-common packages." echo "Note, the Mandrake mysql has ssl disabled. If an installation of mysql" echo "has ssl enabled, then the last link step for Gequel requires -lssl." skip_key gequel if [ "$nnn" ];then echo "Compiling/installing gequel..." if [ ! -f /usr/lib/mysql/libmysqlclient.a ];then #this fixes a problem with Mandrake 9.2... ln -s /usr/lib/libmysqlclient.a /usr/lib/mysql/libmysqlclient.a fi cd $PUPPYDIR/sources7/Gequel cd Gtk1.2 make distclean &>/dev/null ./autogen.sh &>/dev/null ./configure --sysconfdir=/etc --localstatedir=/var &>logconfig.txt make &>logbuild.txt sync cp -afv src/gequel $DESTDIR/usr/local/bin/;check_status $? sync binstripfunc "$DESTDIR/usr/local/bin/gequel" fi #echo #skip_key libicq #if [ "$nnn" ];then # echo "Compiling/installing libicq..." # echo "Note, needed by gicq." # cd $PUPPYDIR/sources7/libicq-0.33 # make uninstall &>/dev/null # make distclean &>/dev/null # ./configure --prefix=/usr --host=i486-pc-linux-gnu --localstatedir=/var &>logconfig.txt # make install &>loginstall.txt # #ls /usr/lib/libicq.a;check_status $? # sync # cp -afv /usr/lib/libicq.so $DESTDIR/usr/lib/;check_status $? # cp -afv /usr/lib/libicq.so.0 $DESTDIR/usr/lib/;check_status $? # cp -afv /usr/lib/libicq.so.0.0.3 $DESTDIR/usr/lib/;check_status $? # sync # libstripfunc "$DESTDIR/usr/lib/libicq.so.0.0.3" #fi #echo #skip_key gicq #if [ "$nnn" ];then # echo "Compiling/installing gicq..." # echo "Note, uses libicq.so.0." # cd $PUPPYDIR/sources7/gicq-0.33 # make distclean &>/dev/null # ./configure --without-gnome --disable-nls --host=i486-pc-linux-gnu --sysconfdir=/etc --localstatedir=/var &>logconfig.txt # make &>logbuild.txt # sync # cp -afv src/gicq $DESTDIR/usr/local/bin/;check_status $? # sync # binstripfunc "$DESTDIR/usr/local/bin/gicq" #fi echo echo "Mandrake 9.2 has the libtool package, and in my case it is already installed" echo "however it is a broken installation. We have to compile it and overwrite..." echo "Ayttm needs the library libltdl.so which is in libtool package..." echo "At least, I am overwriting with the same version, 1.4.3." skip_key libtool if [ "$nnn" ];then if [ -f /usr/include/ltdl.h ];then echo "...already done." else echo "Compiling/installing libtool..." cd $PUPPYDIR/sources7/libtool-1.4.3 make distclean &>/dev/null ./configure --prefix=/usr --host=i486-pc-linux-gnu --localstatedir=/var &>logconfig.txt make &>logbuild.txt make install &>loginstall.txt fi fi echo echo "NOTE: Have not put Ayttm into Puppy!!!" echo "Ayttm needs libltdl.so which is part of libtool package. The Mandrake 9.2" echo "install is incomplete and there doesn't seem to be a -devel rpm." skip_key ayttm if [ "$nnn" ];then echo "Compiling/installing ayttm..." cd $PUPPYDIR/sources7/ayttm-0.4.6 make uninstall &>/dev/null make distclean &>/dev/null ./configure --enable-xft --enable-smtp --disable-esd --disable-arts --with-x --disable-crash-dialog --disable-nls --build=i486-pc-linux-gnu --sysconfdir=/etc --localstatedir=/var &>logconfig.txt make &>logbuild.txt make install &>loginstall.txt fi echo skip_key gtimer if [ "$nnn" ];then echo "Compiling/installing gtimer..." cd $PUPPYDIR/sources7/gtimer-1.1.6 make distclean &>/dev/null ./configure --disable-ssext --host=i486-pc-linux-gnu --sysconfdir=/etc --localstatedir=/var &>logconfig.txt make &>logbuild.txt sync cp -afv gtimer $DESTDIR/usr/local/bin/;check_status $? sync binstripfunc "$DESTDIR/usr/local/bin/gtimer" fi #echo #skip_key gtkdiskfree #if [ "$nnn" ];then # echo "Compiling/installing gtkdiskfree..." # cd $PUPPYDIR/sources7/gtkdiskfree-1.8.4 # make distclean &>/dev/null # ./configure --disable-nls --host=i486-pc-linux-gnu --sysconfdir=/etc --localstatedir=/var &>logconfig.txt # sync # cp -afv gtkdiskfree $DESTDIR/usr/sbin/;check_status $? # sync # binstripfunc "$DESTDIR/usr/sbin/gtkdiskfree" #fi #echo #skip_key gtksshlogin #if [ "$nnn" ];then # echo "Compiling/installing gtksshlogin..." # cd $PUPPYDIR/sources7/gtksshlogin # #do not configure, have edited makefiles. # make clean &>/dev/null # make &>logbuild.txt # sync # cp -afv src/gtksshlogin $DESTDIR/usr/sbin/;check_status $? # sync # binstripfunc "$DESTDIR/usr/sbin/gtksshlogin" #fi echo skip_key ssh-gui if [ "$nnn" ];then echo "Compiling/installing ssh-gui..." cd $PUPPYDIR/sources7/ssh-gui-0.7.1 #do not configure, have edited makefiles. make clean &>/dev/null make &>logbuild.txt sync cp -afv ssh-gui $DESTDIR/usr/sbin/;check_status $? sync binstripfunc "$DESTDIR/usr/sbin/ssh-gui" fi echo skip_key knowde if [ "$nnn" ];then echo "Compiling/installing knowde..." cd $PUPPYDIR/sources7/knowde #have edited makefiles, plus more stuff. make clean &>/dev/null make &>logbuild.txt sync cp -afv bin/knowde $DESTDIR/usr/local/bin/;check_status $? sync binstripfunc "$DESTDIR/usr/local/bin/knowde" fi echo skip_key linpopup if [ "$nnn" ];then echo "Compiling/installing linpopup..." echo "Note, edited rootfs-skeleton/etc/samba/smb.cnf" cd $PUPPYDIR/sources7/LinPopUp-1.2.0/src make clean &>/dev/null make &>logbuild.txt sync cp -afv LinPopUp $DESTDIR/usr/local/bin/;check_status $? sync binstripfunc "$DESTDIR/usr/local/bin/LinPopUp" fi echo skip_key metamail if [ "$nnn" ];then echo "Compiling/installing metamail..." echo "Note, Makefile edited. I only want mimencode, use for slidedraw." cd $PUPPYDIR/sources7/metamail-2.7/metamail make clean &>/dev/null make &>logbuild.txt sync cp -afv mmencode $DESTDIR/usr/bin/mimencode;check_status $? sync binstripfunc "$DESTDIR/usr/bin/mimencode" fi echo skip_key mpcb if [ "$nnn" ];then echo "Compiling/installing mpcb..." cd $PUPPYDIR/sources7/mpcb-0.4.2 make distclean &>/dev/null ./configure --localstatedir=/var --host=i486-pc-linux-gnu --disable-nls --disable-gnome --with-x --disable-linux-console &>logconfig.txt make &>logbuild.txt sync cp -afv src/mpcb $DESTDIR/usr/local/bin/;check_status $? sync binstripfunc "$DESTDIR/usr/local/bin/mpcb" fi echo skip_key rdesktop if [ "$nnn" ];then echo "Compiling/installing rdesktop..." cd $PUPPYDIR/sources7/rdesktop-1.3.1 make clean &>/dev/null ./configure --with-openssl=/usr &>logconfig.txt make &>logbuild.txt sync cp -afv rdesktop $DESTDIR/usr/local/bin/;check_status $? sync binstripfunc "$DESTDIR/usr/local/bin/rdesktop" fi #echo #skip_key xbubble #if [ "$nnn" ];then # echo "Compiling/installing xbubble..." # cd $PUPPYDIR/sources7/xbubble-0.2.4 # make distclean &>/dev/null # ./configure --localstatedir=/var --host=i486-pc-linux-gnu --with-x &>logconfig.txt # make &>logbuild.txt # sync # cp -afv src/xbubble $DESTDIR/usr/local/bin/;check_status $? # sync # binstripfunc "$DESTDIR/usr/local/bin/xbubble" #fi #echo #skip_key gnoise #if [ "$nnn" ];then # echo "Compiling/installing gnoise..." # cd $PUPPYDIR/sources7/gnoise-0.1.15 # make distclean &>/dev/null # ./configure --disable-gnome --localstatedir=/var --sysconfdir=/etc --host=i486-pc-linux-gnu &>logconfig.txt # make &>logbuild.txt # sync # cp -afv src/gnoise $DESTDIR/usr/local/bin/;check_status $? # sync # binstripfunc "$DESTDIR/usr/local/bin/gnoise" #fi ####END####