Andrew Benton wrote:

> Indeed. I don't know how to do that yet. There are hundreds of little
> details to be checked. Like hidden dependencies. How do you check just
> what (of the things already installed) is needed by the next package?

I know Randy has some sophisticated scripts, and there are a lot of ways
to do it, but my method looks like:

#!/bin/bash

TIMEFMT='%1R Elapsed Time - '

#######################
# Installing glib

DIR=`pwd`
PROGRAM=glib-1.2.10
LOG="$DIR/$PROGRAM.log"
TITLE="$PROGRAM"
TIMEFORMAT="$TIMEFMT $TITLE"

BUILDDIR=/tmp/glib
rm -rf $BUILDDIR
mkdir -p $BUILDDIR
pushd $BUILDDIR

before2=`df -k / | grep / | sed -e "s/ \{2,\}/ /g" | cut -d' ' -f3`

tar -xf $DIR/$PROGRAM.tar.gz || exit 1

cd $PROGRAM
{ time \
  {
    echo Making $TITLE
    date

    patch -Np1 -i $DIR/$PROGRAM-gcc34-1.patch &&
    ./configure --prefix=/usr &&
    make &&
    make DESTDIR=$BUILDDIR/install install &&
    #chmod -v 755 /usr/lib/libgmodule-1.2.so.0.0.10
  }
} 2>&1 | tee -a $LOG

if [ $PIPESTATUS -ne 0 ]; then exit 1; fi;

echo "`du -k $DIR/$PROGRAM.tar.gz` size" | tee -a $LOG
after2=`df -k / | grep / | sed -e "s/ \{2,\}/ /g" | cut -d" " -f3`
echo "$(($after2-$before2)) kilobytes / build size - $PROGRAM" | \
  tee -a $LOG
md5sum $DIR/$PROGRAM.tar.gz

exit 0

This puts everything in a log.  You can look at the files installed in
$BUILDDIR/install and review the log that is saved for dependencies not
found, etc.

I probably should add bc commands to calculate M sizes and SBU times
too, but I haven't done that yet.

Of course you look at INSTALL, README, etc also.  Sometimes there is a
web page that has info too, but the docs often lag the source so they
are not always accurate.

Randy, is there anything else you do regularly?

  -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to