wok-current rev 11395

Compat: re-implement tazwok specific code into linux receipt.
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sat Dec 10 06:08:28 2011 +0100 (2011-12-10)
parents 6a3b301b67e5
children 903c03d31ebf
files linux/receipt
line diff
     1.1 --- a/linux/receipt	Sat Dec 10 05:21:59 2011 +0100
     1.2 +++ b/linux/receipt	Sat Dec 10 06:08:28 2011 +0100
     1.3 @@ -13,8 +13,6 @@
     1.4  DEPENDS="depmod"
     1.5  BUILD_DEPENDS="slitaz-toolchain perl git lzma patch"
     1.6  
     1.7 -# FIXME: tazwok specific code in functions
     1.8 -
     1.9  # Rules to configure and make the package.
    1.10  compile_rules()
    1.11  {
    1.12 @@ -25,27 +23,24 @@
    1.13  	#	sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i
    1.14  	#done
    1.15  
    1.16 -	# FIXME: tazwok specific code
    1.17 -	#report open-bloc
    1.18 +	[ ! -x /usr/bin/cook ] && report open-bloc
    1.19  
    1.20  	# Check for Aufs and cook it if unbuilt.
    1.21  	echo "Checking for Aufs packages..."
    1.22  	_AUFSVER=`grep  ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.23 -	AUFSDIR=$WOK/aufs/aufs-${_AUFSVER}
    1.24 -	[ -d "$AUFSDIR" ] || AUFSDIR=$WOK/aufs/source/aufs-${_AUFSVER}
    1.25 -	if [ ! -d "$AUFSDIR" ]; then
    1.26 -		if [ -x /usr/bin/cook ]; then
    1.27 -			# Give info an redirect to /dev/null since aufs got it own log.
    1.28 -			echo "Cook: aufs $_AUFSVER"
    1.29 -			cook aufs > /dev/null
    1.30 -		else [ -x /usr/bin/tazwok ]
    1.31 -			tazwok cook aufs
    1.32 -		fi
    1.33 +	if [ ! -d "$AUFSDIR" ] && [ -x /usr/bin/cook ]; then
    1.34 +		# Give info an redirect to /dev/null since aufs got it own log.
    1.35 +		AUFSDIR=$WOK/aufs/source/aufs-${_AUFSVER}
    1.36 +		echo "Cook: aufs $_AUFSVER"
    1.37 +		cook aufs > /dev/null
    1.38 +	elif [ ! -x /usr/bin/cook ]; then
    1.39 +		# We only need aufs source. Also cooking now is a bad idea since it
    1.40 +		# needs linux-module-headers.
    1.41 +		AUFSDIR=$WOK/aufs/aufs-${_AUFSVER}
    1.42 +		[ -d "$AUFSDIR" ] && rm -rf $AUFSDIR
    1.43 +		tazwok get-src aufs --target=$AUFSDIR || { report close-bloc; return 1; }
    1.44  	fi
    1.45  	
    1.46 -	# FIXME: tazwok specific code (if aufs is cooked you dont need to get-src)
    1.47 -	#tazwok get-src aufs --target=$AUFSDIR || { report close-bloc; return 1; }
    1.48 -
    1.49  	echo "Copying Aufs files and patches..."
    1.50  	cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src
    1.51  	cp -a $AUFSDIR/*.patch $stuff
    1.52 @@ -82,16 +77,14 @@
    1.53  005-squashfs-add-xz-compression-configuration-option.patch
    1.54  EOT
    1.55  
    1.56 -	# FIXME: tazwok specific code
    1.57 -	#report step "Make kernel proper and then build lguest"
    1.58 +	[ ! -x /usr/bin/cook ] && report step "Make kernel proper and then build lguest"
    1.59  	
    1.60  	make mrproper
    1.61  	cd Documentation/lguest
    1.62 -	make lguest || { report close-bloc; return 1; }
    1.63 +	make $MAKEFLAGS lguest || { report close-bloc; return 1; }
    1.64  	cd $src
    1.65  
    1.66 -	# FIXME: tazwok specific code
    1.67 -	#report step "Make bzImage without modules first"
    1.68 +	[ ! -x /usr/bin/cook ] && report step "Make bzImage without modules first"
    1.69  
    1.70  	# Build bzImage without modules first
    1.71  	cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config
    1.72 @@ -102,36 +95,35 @@
    1.73  	       -e 's/^CONFIG_R8187SE/#&/' \
    1.74  	       -e 's/^CONFIG_RT2870/#&/' .config
    1.75  	yes '' | make oldconfig
    1.76 -	make -j 4 bzImage || { report close-bloc; return 1; }
    1.77 +	make $MAKEFLAGS bzImage || { report close-bloc; return 1; }
    1.78  	[ -d $PWD/_pkg ] || mkdir -p $PWD/_pkg
    1.79  	mv arch/x86/boot/bzImage $PWD/_pkg
    1.80  	mv System.map System.map-without-modules
    1.81  
    1.82 -	# FIXME: tazwok specific code
    1.83 -	#report step "Now build bzImage with modules"
    1.84 +	[ -x /usr/bin/cook ] && report step "Now build bzImage with modules"
    1.85  	
    1.86  	# Build bzImage with modules
    1.87  	cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config
    1.88  	make oldconfig
    1.89  	ln .config $WOK/$PACKAGE/slitaz/config
    1.90 -	make -j 4 bzImage &&
    1.91 -	make -j 4 modules &&
    1.92 +	make $MAKEFLAGS bzImage &&
    1.93 +	make $MAKEFLAGS modules &&
    1.94  	make INSTALL_MOD_PATH=$PWD/_pkg modules_install &&
    1.95  	make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install &&
    1.96  	[ -s arch/x86/boot/bzImage ] || { report close-bloc; return 1; }
    1.97  	mkdir -p $PWD/_pkg/boot 2> /dev/null
    1.98  	mv arch/x86/boot/bzImage $PWD/_pkg/boot/vmlinuz-$VERSION-slitaz
    1.99  	
   1.100 -	# FIXME: tazwok specific code
   1.101 -	#report step "Compressing all modules"
   1.102 +	[ ! -x /usr/bin/cook ] && report step "Compressing all modules"
   1.103  	
   1.104  	# Compress all modules.
   1.105  	$stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz
   1.106  	ln System.map System.map-modules
   1.107  	ln Module.symvers Module.symvers-modules
   1.108  	
   1.109 -	# FIXME: tazwok specific code
   1.110 -	#report close-bloc
   1.111 +	if [ ! -x /usr/bin/cook ]; then
   1.112 +		report close-bloc
   1.113 +	fi
   1.114  }
   1.115  
   1.116  # Rules to gen a SliTaz package suitable for Tazpkg.
   1.117 @@ -159,11 +151,6 @@
   1.118      # Remove unresolved links
   1.119      rm -f $fs/lib/modules/$VERSION-slitaz/build
   1.120      rm -f $fs/lib/modules/$VERSION-slitaz/source
   1.121 -    # Cook all packages with a kernel module
   1.122 -    for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
   1.123 -    do
   1.124 -    	echo tazwok cook ${i%/receipt}
   1.125 -    done
   1.126      # Check and echo any module in kernel .config that's not added to 
   1.127      # one of linux-* pkgs
   1.128  	$stuff/check_modules.sh