David Masterson (damaster) wrote:
After I've
done the usual "configure; make; make install;" to install the package
and then remove the source code,
Why remove the sources? After configuration, they have all the
information you are asking for.
If it's about saving disk space, most of the bulk in a built package is
in the resulting binaries. It's a pretty wasteful process, what with
the executables duplicating what's in *.o and the convenience libraries,
plus overhead for any static links, plus debug info... So, I just say
'make clean' sometime after 'make install' when I'm sure the package is
working and I won't need to rebuild it for any reason. That keeps the
size of /usr/local/src under control.
If an expanded package still takes up too much space, I "collapse" it:
#!/bin/bash
filename=$1
if [ ! -d "$filename" ] ; then
echo Sorry, $filename is not a directory.
exit
fi
tar -cvjf "$filename.tar.bz2" "$filename"
if [ $? -gt 0 ] ; then
echo Something bad happened while tarring directory. Exiting.
exit
fi
echo
echo Calculating space savings...
typeset -i original=`du -sk "$filename" |cut -f 1`
typeset -i packed=`du -sk "$filename".tar.bz2 |cut -f 1`
typeset -i delta=original-packed
percent=`echo "scale=1;$packed * 100 / $original" |bc`
echo Packed "$original"KB into "$packed"KB\; saved "$delta"KB\; tarball
is $percent% original size.
echo
echo -n "Do you want to remove the directory? [y/N]: "
read answer
echo $answer |grep -i "^y" > /dev/null
if [ $? -eq 0 ] ; then
rm -fr "$filename"
fi
Since I can reconstitute the collapsed build directory at any time, I
can always find out how I built any given installed package.
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf