cookutils rev 464 slitaz-tank
cook: Update set_paths function.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Jun 07 17:33:30 2012 +0000 (2012-06-07) |
parents | 0884204989d4 |
children | f30a85f68f20 |
files | cook |
line diff
1.1 --- a/cook Thu Jun 07 17:20:40 2012 +0000 1.2 +++ b/cook Thu Jun 07 17:33:30 2012 +0000 1.3 @@ -134,24 +134,39 @@ 1.4 # Paths used in receipt and by cook itself. 1.5 set_paths() { 1.6 pkgdir=$WOK/$PACKAGE 1.7 - src=$pkgdir/source/$PACKAGE-$VERSION 1.8 + basesrc=$pkgdir/source 1.9 + tmpsrc=$basesrc/tmp 1.10 + src=$basesrc/$PACKAGE-$VERSION 1.11 taz=$pkgdir/taz 1.12 pack=$taz/$PACKAGE-${VERSION}${EXTRAVERSION} 1.13 fs=$pack/fs 1.14 stuff=$pkgdir/stuff 1.15 install=$pkgdir/install 1.16 + pkgsrc="${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}" 1.17 + if [ "$PATCH" ]; then 1.18 + [ "${PTARBALL}" ] || PTARBALL="$(basename $PATCH)" 1.19 + fi 1.20 if [ "$WANTED" ]; then 1.21 - wanted=${WANTED%% *} 1.22 - src=$WOK/$wanted/source/$wanted-$VERSION 1.23 - install=$WOK/$wanted/install 1.24 - wanted_stuff=$WOK/$wanted/stuff 1.25 + basesrc=$WOK/$WANTED/source 1.26 + src=$basesrc/$WANTED-$VERSION 1.27 + install=$WOK/$WANTED/install 1.28 + wanted_stuff=$WOK/$WANTED/stuff 1.29 fi 1.30 if [ "$SOURCE" ]; then 1.31 source_stuff=$WOK/$SOURCE/stuff 1.32 fi 1.33 - # Kernel version is set from linux-api-headers since it is part of toolchain. 1.34 - if [ -f "$INSTALLED/linux-api-headers/receipt" ]; then 1.35 - kvers=$(grep ^VERSION= $INSTALLED/linux-api-headers/receipt | cut -d '"' -f 2) 1.36 + # Kernel version is set from linux 1.37 + if [ -f "$WOK/linux/receipt" ]; then 1.38 + kvers=$(grep ^VERSION= $WOK/linux/receipt | cut -d '"' -f 2) 1.39 + kbasevers=${kvers:0:3} 1.40 + fi 1.41 + # Python version 1.42 + if [ -f "$WOK/python/receipt" ]; then 1.43 + pyvers=$(grep ^VERSION= $WOK/python/receipt | cut -d '"' -f 2) 1.44 + fi 1.45 + # perl version for some packages needed it 1.46 + if [ -f "$WOK/perl/receipt" ]; then 1.47 + perlvers=$(grep ^VERSION= $WOK/perl/receipt | cut -d '"' -f 2) 1.48 fi 1.49 # Old way compatibility. 1.50 _pkg=$install