# $Id:$ # functions for recording installation of a package and make a tarball, # or using fakeroot type commands for install, then packing and installing # the package. # We only have access to variables PKGDIR and PKG_DEST. Other variables could # be set in the environment extract_version() { local VERSION case $1 in expect*|tcl*|tk*|mozjs*) VERSION=$(echo $1 | sed 's/^[^0-9]*//') ;; vim*|unzip*|zip*) VERSION=$(echo $1 | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;; wireless_tools*|LVM2*) VERSION=$(echo $1 | sed 's/^[^.]*\.//') ;; x264*) VERSION=$(echo $1 | sed 's/.*shot-//') ;; icu*) # No version in PCKGVRS! Use version directly from xml book. # PACK_INSTALL contains the path to this script, which is in the # parent dir of the book. local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent local VERSION1=$(sed -n 's/.*icu-major[^0-9]*\([^"]*\).*/\1/p' $PACKENT) local VERSION2=$(sed -n 's/.*icu-minor[^0-9]*\([^"]*\).*/\1/p' $PACKENT) VERSION=$VERSION1.$VERSION2 ;; soundtouch*) local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent VERSION=$(sed -n 's/.*soundtouch[^0-9]*\([^"]*\).*/\1/p' $PACKENT) ;; xf86-video-intel) local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/x/installing/x7driver-intel.xml VERSION=$(sed -n '/