tazwok rev 541 4.3

Merge default.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Jul 06 12:28:01 2011 +0000 (2011-07-06)
parents ba40ec6eac2b a1fb349257d8
children fcc1dc4dd1af
files examples/tazwok.conf tazwok
line diff
     1.1 --- a/.hgtags	Wed Jul 06 12:24:43 2011 +0000
     1.2 +++ b/.hgtags	Wed Jul 06 12:28:01 2011 +0000
     1.3 @@ -30,3 +30,4 @@
     1.4  621bcc0de8ca7e029c7ca34060786f4cf8fba0f9 4.2.13
     1.5  1165e2c0ac23be43123fef2fc5b3b13ef11e2099 4.2.14
     1.6  40ed5424dbfcbd93a0e59376495f916552f57f34 4.2.15
     1.7 +a771874e05d6b7b3e74c71fd6a67f7f6d511f4b9 4.2.16
     2.1 --- a/examples/tazwok.conf	Wed Jul 06 12:24:43 2011 +0000
     2.2 +++ b/examples/tazwok.conf	Wed Jul 06 12:28:01 2011 +0000
     2.3 @@ -64,7 +64,7 @@
     2.4  # with same hardware and newest of the same family :
     2.5  #CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
     2.6  #CFLAGS="-mtune=$ARCH -O2 -pipe -fomit-frame-pointer"
     2.7 -CFLAGS="-march=$ARCH -0s -pipe -fomit-frame-pointer"
     2.8 +CFLAGS="-march=$ARCH -Os -pipe -fomit-frame-pointer"
     2.9  CXXFLAGS="$CFLAGS"
    2.10  
    2.11  # Default tool prefix.
     3.1 --- a/tazwok	Wed Jul 06 12:24:43 2011 +0000
     3.2 +++ b/tazwok	Wed Jul 06 12:28:01 2011 +0000
     3.3 @@ -480,6 +480,11 @@
     3.4  	fi
     3.5  	stuff=$WOK/$PACKAGE/stuff
     3.6  	[ "$WANTED" ] && wanted_stuff=$WOK/$WANTED/stuff
     3.7 +	# Kernel version is set from linux-api-headers since it part of toolchain.
     3.8 +	if [ -f "$LOCALSTATE/installed/linux-api-headers/receipt" ]; then
     3.9 +		kvers=$(grep ^VERSION= $LOCALSTATE/installed/linux-api-headers/receipt | \
    3.10 +			cut -d '"' -f 2)
    3.11 +	fi
    3.12  }
    3.13  
    3.14  set_pkg_path()
    3.15 @@ -527,17 +532,17 @@
    3.16  	fi
    3.17  	tmp_src=$tmp/tarball-$$
    3.18  	if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ] && \
    3.19 -		[ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] ; then
    3.20 +		[ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" ] ; then
    3.21  		cd $SOURCES_REPOSITORY
    3.22  		if [ "$SOURCE" ]; then
    3.23 -			alt_url="http://mirror.slitaz.org/sources/packages/${SOURCE:0:1}/$SOURCE-$VERSION.tar.lzma"
    3.24 +			alt_url="http://mirror.slitaz.org/sources/packages/${SOURCE:0:1}/$SOURCE-${KBASEVER:-$VERSION}.tar.lzma"
    3.25  		else
    3.26 -			alt_url="http://mirror.slitaz.org/sources/packages/${PACKAGE:0:1}/$PACKAGE-$VERSION.tar.lzma"
    3.27 +			alt_url="http://mirror.slitaz.org/sources/packages/${PACKAGE:0:1}/$PACKAGE-${KBASEVER:-$VERSION}.tar.lzma"
    3.28  		fi
    3.29  		download $WGET_URL $alt_url http://mirror.slitaz.org/sources/packages/${TARBALL:0:1}/$TARBALL
    3.30  		unset alt_url
    3.31  		if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ] && \
    3.32 -			[ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] && \
    3.33 +			[ ! -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" ] && \
    3.34  			[ ! -d $tmp_src ]; then
    3.35  			echo -e "\nDownload failed, exiting. Please check WGET_URL variable.\n" >&2
    3.36  			report end-step
    3.37 @@ -545,7 +550,7 @@
    3.38  		fi
    3.39  	fi
    3.40  	report end-step
    3.41 -	if { [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] && [ "$nounpack" ] ; } || \
    3.42 +	if { [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" ] && [ "$nounpack" ] ; } || \
    3.43  	{ [ -f "$SOURCES_REPOSITORY/$TARBALL" ] && [ "$repack_src" != yes ] && [ "$nounpack" ] ; }; then
    3.44  		[ -d "$tmp_src" ] && rm -r "$tmp_src"
    3.45  		return 0
    3.46 @@ -559,11 +564,11 @@
    3.47  	# If $tmp_src exists, there's already a unpacked tarball in it.
    3.48  	if ! [ -d "$tmp_src" ]; then
    3.49  		mkdir "$tmp_src"
    3.50 -		if [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] && [ "$repack_src" = yes ]; then
    3.51 -			lzma d $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma -so | \
    3.52 +		if [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" ] && [ "$repack_src" = yes ]; then
    3.53 +			lzma d $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma -so | \
    3.54  				tar xf - -C "$tmp_src"
    3.55  			repack_src=no
    3.56 -			TARBALL=${SOURCE:-$PACKAGE}-$VERSION.tar.lzma
    3.57 +			TARBALL=${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma
    3.58  		elif [ -f "$SOURCES_REPOSITORY/$TARBALL" ]; then
    3.59  			case "$TARBALL" in
    3.60  				*zip|*xpi) cd $tmp_src && unzip -o $SOURCES_REPOSITORY/$TARBALL ;;
    3.61 @@ -574,6 +579,7 @@
    3.62  				*Z|*taz) uncompress -c $SOURCES_REPOSITORY/$TARBALL | tar xf - -C $tmp_src;;
    3.63  				*gz) tar xzf $SOURCES_REPOSITORY/$TARBALL -C $tmp_src;;
    3.64  				*rpm) cd $tmp_src && rpm2cpio $SOURCES_REPOSITORY/$TARBALL | cpio -idm --quiet;;
    3.65 +				*.run) cd $tmp_src && sh $SOURCES_REPOSITORY/$TARBALL $RUN_OPTS;;
    3.66  
    3.67  				# It's a plain file or something receipt unpack itself.	
    3.68  				*)
    3.69 @@ -606,7 +612,7 @@
    3.70  	if [ "$repack_src" = yes ]; then
    3.71  			report step "Repacking sources in .tar.lzma format"
    3.72  			[ "$TARBALL" ] && rm -f $SOURCES_REPOSITORY/$TARBALL
    3.73 -			TARBALL=${SOURCE:-$PACKAGE}-$VERSION.tar.lzma
    3.74 +			TARBALL=${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma
    3.75  			cd "$tmp_src"
    3.76  			tar -c * | lzma e $SOURCES_REPOSITORY/$TARBALL -si
    3.77  	fi
    3.78 @@ -663,8 +669,8 @@
    3.79  		[ "$WGET_URL" ] || continue
    3.80  		if grep -q "^$PACKAGE | $VERSION" $PACKAGES_REPOSITORY/packages.desc; then
    3.81  			main_version="$VERSION"
    3.82 -			if [ -f $src_repository/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma ]; then
    3.83 -				echo -e "$PACKAGE:main\t${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" >> $src_repository/sources.list
    3.84 +			if [ -f $src_repository/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma ]; then
    3.85 +				echo -e "$PACKAGE:main\t${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" >> $src_repository/sources.list
    3.86  			elif [ -f "$src_repository/$TARBALL" ]; then
    3.87  				echo -e "$PACKAGE:main\t$TARBALL" >> $src_repository/sources.list
    3.88  			fi
    3.89 @@ -678,8 +684,8 @@
    3.90  			fi
    3.91  		fi
    3.92  		if [ ! "$main_version" ] || [ $(grep -q "^$PACKAGE | $VERSION" $INCOMING_REPOSITORY/packages.desc 2>/dev/null) ]; then
    3.93 -			if [ -f $src_repository/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma ]; then
    3.94 -				echo -e "$PACKAGE:incoming\t${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" >> $src_repository/sources.list
    3.95 +			if [ -f $src_repository/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma ]; then
    3.96 +				echo -e "$PACKAGE:incoming\t${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" >> $src_repository/sources.list
    3.97  			elif [ -f "$src_repository/$TARBALL" ]; then
    3.98  				echo -e "$PACKAGE:incoming\t$TARBALL" >> $src_repository/sources.list
    3.99  			fi
   3.100 @@ -1550,7 +1556,8 @@
   3.101  	unset PACKAGE SOURCE VERSION EXTRAVERSION CATEGORY SHORT_DESC \
   3.102  		MAINTAINER WEB_SITE WGET_URL DEPENDS BUILD_DEPENDS WANTED \
   3.103  		PACKED_SIZE UNPACKED_SIZE COOK_OPT PROVIDE CONFIG_FILES TAGS \
   3.104 -		src _pkg DESTDIR CONFIG_SITE BRANCH TARBALL stuff wanted_stuff
   3.105 +		src _pkg DESTDIR CONFIG_SITE BRANCH TARBALL KBASEVER \
   3.106 +		stuff wanted_stuff
   3.107  	. ${RECEIPT:-$PWD/receipt}
   3.108  }
   3.109