cookutils rev 737

cook: tiny edits.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri May 15 16:50:15 2015 +0300 (2015-05-15)
parents b0c983a10873
children 0875b3f3ecc3
files cook
line diff
     1.1 --- a/cook	Tue May 12 17:42:06 2015 +0300
     1.2 +++ b/cook	Fri May 15 16:50:15 2015 +0300
     1.3 @@ -478,7 +478,7 @@
     1.4  
     1.5  strip_package() {
     1.6  	case "$ARCH" in
     1.7 -		arm*|x86_64) export STRIP="${HOST_SYSTEM}-strip" ;;
     1.8 +		arm*|x86_64) export STRIP="$HOST_SYSTEM-strip" ;;
     1.9  		*)           export STRIP='strip' ;;
    1.10  	esac
    1.11  	_n 'Executing strip on all files...'
    1.12 @@ -544,27 +544,27 @@
    1.13  			tools="$CROSS_TREE/tools"
    1.14  			# Set root path when cross compiling. ARM tested but not x86_64
    1.15  			# When cross compiling we must install build deps in $sysroot.
    1.16 -			arch="-${ARCH}"
    1.17 +			arch="-$ARCH"
    1.18  			root="$sysroot"
    1.19  			_ '%s sysroot: %s' "$ARCH" "$sysroot"
    1.20  			_ 'Adding "%s" to PATH' "$tools/bin"
    1.21  			export PATH="$PATH:$tools/bin"
    1.22  			export PKG_CONFIG_PATH="$sysroot/usr/lib/pkgconfig"
    1.23 -			export CROSS_COMPILE="${HOST_SYSTEM}-"
    1.24 +			export CROSS_COMPILE="$HOST_SYSTEM-"
    1.25  			_ 'Using cross-tools: %s' "$CROSS_COMPILE"
    1.26  			if [ "$ARCH" == 'x86_64' ]; then
    1.27 -				export CC="${HOST_SYSTEM}-gcc -m64"
    1.28 -				export CXX="${HOST_SYSTEM}-g++ -m64"
    1.29 +				export CC="$HOST_SYSTEM-gcc -m64"
    1.30 +				export CXX="$HOST_SYSTEM-g++ -m64"
    1.31  			else
    1.32 -				export CC="${HOST_SYSTEM}-gcc"
    1.33 -				export CXX="${HOST_SYSTEM}-g++"
    1.34 +				export CC="$HOST_SYSTEM-gcc"
    1.35 +				export CXX="$HOST_SYSTEM-g++"
    1.36  			fi
    1.37 -			export AR="${HOST_SYSTEM}-ar"
    1.38 -			export AS="${HOST_SYSTEM}-as"
    1.39 -			export RANLIB="${HOST_SYSTEM}-ranlib"
    1.40 -			export LD="${HOST_SYSTEM}-ld"
    1.41 -			export STRIP="${HOST_SYSTEM}-strip"
    1.42 -			export LIBTOOL="${HOST_SYSTEM}-libtool" ;;
    1.43 +			export AR="$HOST_SYSTEM-ar"
    1.44 +			export AS="$HOST_SYSTEM-as"
    1.45 +			export RANLIB="$HOST_SYSTEM-ranlib"
    1.46 +			export LD="$HOST_SYSTEM-ld"
    1.47 +			export STRIP="$HOST_SYSTEM-strip"
    1.48 +			export LIBTOOL="$HOST_SYSTEM-libtool" ;;
    1.49  	esac
    1.50  
    1.51  	[ -n "$QA" ] && receipt_quality
    1.52 @@ -596,7 +596,7 @@
    1.53  	for dep in $BUILD_DEPENDS; do
    1.54  		implicit="${dep%-dev}"
    1.55  		for i in $dep $implicit; do
    1.56 -			if [ ! -f "${root}$INSTALLED/$i/receipt" ]; then
    1.57 +			if [ ! -f "$root$INSTALLED/$i/receipt" ]; then
    1.58  				# Try local package first. In some cases implicit doesn't exist, ex:
    1.59  				# libboost-dev exists but not libboost, so check if we got vers.
    1.60  				unset vers
    1.61 @@ -621,7 +621,7 @@
    1.62  						fi
    1.63  					else
    1.64  						# Package is not in wok but may be in online repo.
    1.65 -						if fgrep -q $i-${vers}${arch} ${root}$DB/packages.list; then
    1.66 +						if fgrep -q $i-$vers$arch $root$DB/packages.list; then
    1.67  							echo $i >> $CACHE/installed.web
    1.68  						else
    1.69  							_ 'ERROR: unknown dep "%s"' "$i"
    1.70 @@ -665,7 +665,7 @@
    1.71  		exit 1
    1.72  	fi
    1.73  
    1.74 -	# Install local packages: package-version${arch}
    1.75 +	# Install local packages: package-version$arch
    1.76  	cd $PKGS
    1.77  	for i in $(uniq $CACHE/installed.local); do
    1.78  		_ 'Installing dep (pkg/local): %s' "$i"
    1.79 @@ -861,7 +861,7 @@
    1.80  	# Compress.
    1.81  	_n 'Creating full cpio archive...'
    1.82  	find . -print | cpio -o -H newc --quiet > \
    1.83 -		../$PACKAGE-${VERSION}${EXTRAVERSION}${arch}.tazpkg
    1.84 +		../$PACKAGE-$VERSION$EXTRAVERSION$arch.tazpkg
    1.85  	status
    1.86  
    1.87  	_n 'Restoring original package tree...'
    1.88 @@ -926,14 +926,14 @@
    1.89  install_package() {
    1.90  	case "$ARCH" in
    1.91  		arm*|x86_64)
    1.92 -			arch="-${ARCH}"
    1.93 +			arch="-$ARCH"
    1.94  			root="$CROSS_TREE/sysroot" ;;
    1.95  	esac
    1.96  	# Install package if requested but skip install if target host doesn't
    1.97  	# match build system or it will break the build chroot.
    1.98  	build=$(echo $BUILD_SYSTEM | cut -d- -f1)
    1.99  	if [ -n "$inst" ] && [ "$build" == "$ARCH" ]; then
   1.100 -		if [ -f "$PKGS/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg" ]; then
   1.101 +		if [ -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ]; then
   1.102  			cd $PKGS
   1.103  			tazpkg install $PACKAGE-$VERSION$EXTRAVERSION.tazpkg --forced
   1.104  		else
   1.105 @@ -1004,7 +1004,7 @@
   1.106  	status=$?
   1.107  
   1.108  	_ 'Leaving aufs chroot...'
   1.109 -	umount_aufs ${base}
   1.110 +	umount_aufs $base
   1.111  	# Install package outside the aufs jail
   1.112  	install_package
   1.113  	exit $status
   1.114 @@ -1024,9 +1024,9 @@
   1.115  	pubdate=$(date '+%a, %d %b %Y %X')
   1.116  	cat > $FEEDS/$pkg.xml <<EOT
   1.117  	<item>
   1.118 -		<title>$PACKAGE $VERSION${EXTRAVERSION}</title>
   1.119 +		<title>$PACKAGE $VERSION$EXTRAVERSION</title>
   1.120  		<link>${COOKER_URL}?pkg=$PACKAGE</link>
   1.121 -		<guid>$PACKAGE-$VERSION${EXTRAVERSION}</guid>
   1.122 +		<guid>$PACKAGE-$VERSION$EXTRAVERSION</guid>
   1.123  		<pubDate>$pubdate</pubDate>
   1.124  		<description>$(echo -n "$SHORT_DESC" | xml_ent)</description>
   1.125  	</item>
   1.126 @@ -1275,7 +1275,7 @@
   1.127  			colorize 36 $(_ 'WARNING: %s is not installed in sysroot' '(e)glibc-base')
   1.128  		fi
   1.129  		# Show GCC version or warn if not yet compiled.
   1.130 -		if [ -x "$tools/bin/${HOST_SYSTEM}-gcc" ]; then
   1.131 +		if [ -x "$tools/bin/$HOST_SYSTEM-gcc" ]; then
   1.132  			_ 'Cross compiler  : %s' "$HOST_SYSTEM-gcc"
   1.133  		else
   1.134  			colorize 36 $(_ 'C compiler "%s" is missing' "$HOST_SYSTEM-gcc")