wok rev 5924

busybox: fix pre_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 28 14:15:27 2010 +0200 (2010-07-28)
parents 4234202a789b
children f5d1df2b1b21
files busybox-pam/receipt busybox-static/receipt busybox/receipt
line diff
     1.1 --- a/busybox-pam/receipt	Wed Jul 28 13:23:18 2010 +0200
     1.2 +++ b/busybox-pam/receipt	Wed Jul 28 14:15:27 2010 +0200
     1.3 @@ -35,9 +35,13 @@
     1.4  EOT
     1.5      cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config
     1.6      sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
     1.7 -    make oldconfig
     1.8 -    # "CFLAGS=-O0" is a workaround for GCC 4.5.0
     1.9 -    make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install
    1.10 +    if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then
    1.11 +	# "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crash)
    1.12 +	# "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage)
    1.13 +	make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install
    1.14 +    else
    1.15 +	make -j 4 && make install
    1.16 +    fi
    1.17      echo "Chmod 4755 on busybox binary..."
    1.18      chmod 4755 _install/bin/busybox
    1.19  }
    1.20 @@ -93,7 +97,7 @@
    1.21  		tazpkg get-install glibc-base --forced
    1.22  	fi
    1.23  	answer=""
    1.24 -	while read i ; do
    1.25 +	for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do
    1.26  		[ -f $1$i ] || continue
    1.27  		case "$i" in
    1.28  		/bin/busybox) continue ;;
    1.29 @@ -109,12 +113,13 @@
    1.30  			esac
    1.31  		fi
    1.32  		cp -a $1$i $1$i-busybox-install
    1.33 -	done < $1$INSTALLED/$PACKAGE/files.list
    1.34 +	done
    1.35  }
    1.36  
    1.37  post_install()
    1.38  {
    1.39  	local i
    1.40 +	[ -f /etc/resolv.conf-busybox-install ] &&
    1.41  	mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
    1.42  	while read i ; do
    1.43  		[ -f $1$i-busybox-install ] || continue
     2.1 --- a/busybox-static/receipt	Wed Jul 28 13:23:18 2010 +0200
     2.2 +++ b/busybox-static/receipt	Wed Jul 28 14:15:27 2010 +0200
     2.3 @@ -33,8 +33,13 @@
     2.4  EOT
     2.5      cp ../stuff/$SOURCE-$VERSION.config .config
     2.6      make oldconfig
     2.7 -    # "CFLAGS=-O0" is a workaround for GCC 4.5.0
     2.8 -    make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install
     2.9 +    if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then
    2.10 +	# "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crash)
    2.11 +	# "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage)
    2.12 +	make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install
    2.13 +    else
    2.14 +	make -j 4 && make install
    2.15 +    fi
    2.16      echo "Chmod 4755 on busybox binary..."
    2.17      chmod 4755 _install/bin/busybox
    2.18  }
     3.1 --- a/busybox/receipt	Wed Jul 28 13:23:18 2010 +0200
     3.2 +++ b/busybox/receipt	Wed Jul 28 14:15:27 2010 +0200
     3.3 @@ -33,7 +33,7 @@
     3.4      cp ../stuff/$PACKAGE-$VERSION.config .config
     3.5      make oldconfig
     3.6      if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then
     3.7 -	# "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crach)
     3.8 +	# "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crash)
     3.9  	# "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage)
    3.10  	make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install
    3.11      else
    3.12 @@ -85,7 +85,7 @@
    3.13  		tazpkg get-install glibc-base --forced
    3.14  	fi
    3.15  	answer=""
    3.16 -	while read i ; do
    3.17 +	for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do
    3.18  		[ -f $1$i ] || continue
    3.19  		case "$i" in
    3.20  		/bin/busybox) continue ;;
    3.21 @@ -101,12 +101,13 @@
    3.22  			esac
    3.23  		fi
    3.24  		cp -a $1$i $1$i-busybox-install
    3.25 -	done < $1$INSTALLED/$PACKAGE/files.list
    3.26 +	done
    3.27  }
    3.28  
    3.29  post_install()
    3.30  {
    3.31  	local i
    3.32 +	[ -f /etc/resolv.conf-busybox-install ] &&
    3.33  	mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
    3.34  	while read i ; do
    3.35  		[ -f $1$i-busybox-install ] || continue