diff --git a/pkgmngt/packInstall.sh.porg b/pkgmngt/packInstall.sh.porg index d48ae69..bda8e71 100644 --- a/pkgmngt/packInstall.sh.porg +++ b/pkgmngt/packInstall.sh.porg @@ -5,10 +5,65 @@ # 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 + ;; + xf86-video-intel) + local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/x/installing/x7driver-intel.xml + VERSION=$(sed -n '/