wok-6.x rev 12804

glibc-base: be part of ARM
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 19 00:05:00 2012 +0200 (2012-05-19)
parents 2b28b3fc0a64
children b26616acb288
files glibc-base/receipt
line diff
     1.1 --- a/glibc-base/receipt	Sat May 19 00:04:09 2012 +0200
     1.2 +++ b/glibc-base/receipt	Sat May 19 00:05:00 2012 +0200
     1.3 @@ -1,12 +1,19 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="glibc-base"
     1.7 -VERSION="2.14.1"
     1.8  CATEGORY="base-system"
     1.9  SHORT_DESC="GNU libc minimal libraries and UTF-8 support for SliTaz."
    1.10  WEB_SITE="http://www.gnu.org/software/libc/"
    1.11 -WANTED="glibc"
    1.12  MAINTAINER="pankso@slitaz.org"
    1.13 +HOST_ARCH="i486 arm"
    1.14 +
    1.15 +case "$ARCH" in
    1.16 +	arm)
    1.17 +		VERSION="2.13" ;;
    1.18 +	i?86)
    1.19 +		VERSION="2.14.1"
    1.20 +		WANTED="glibc" ;;
    1.21 +esac
    1.22  
    1.23  DEFAULT_LOCALE="de_DE en_US en_GB es_ES fr_FR it_IT pt_BR pt_PT ru_RU"
    1.24  
    1.25 @@ -18,22 +25,47 @@
    1.26  #
    1.27  genpkg_rules()
    1.28  {
    1.29 -	# Mkdir's.
    1.30 -	for dir in $(cat $stuff/mkdir.list)
    1.31 -	do
    1.32 -		mkdir -p ${fs}$dir
    1.33 -	done
    1.34 -    # Copy all files specified in stuff/files.list. We get the files
    1.35 -    # from glibc package.
    1.36 -    for file in $(cat $stuff/wanted-files.list)
    1.37 -    do
    1.38 -    	cp -a ${_pkg}$file ${fs}$file
    1.39 -    done
    1.40 -    # i18n
    1.41 -    for i in $DEFAULT_LOCALE
    1.42 -	do
    1.43 -		cp $install/usr/share/i18n/locales/$i $fs/usr/share/i18n/locales
    1.44 -	done
    1.45 +	case "$ARCH" in
    1.46 +		arm)
    1.47 +			# EXPERIMENTAL: Glibc is cross compiled by cross to have a
    1.48 +			# toolchain so we can use these files instead of recooking it.
    1.49 +			# 20120514: Include just minal libs for Busybox so we can create
    1.50 +			# bootable Qemu image for ARM.
    1.51 +			echo "Using cross compiled Glibc"
    1.52 +			mkdir -p $fs/lib $fs/etc $fs/usr/bin
    1.53 +			install=/usr/cross/$ARCH
    1.54 +			for bin in locale localedef
    1.55 +			do
    1.56 +				cp $install/bin/$bin $fs/usr/bin
    1.57 +			done
    1.58 +			for lib in libcrypt libm libc
    1.59 +			do
    1.60 +				cp $install/lib/${lib}-*.so $fs/lib
    1.61 +				cp $install/lib/${lib}.so* $fs/lib
    1.62 +			done
    1.63 +			cp $install/lib/ld-*.so $fs/lib
    1.64 +			cp $install/lib/libnss_*.so* $fs/lib
    1.65 +			cp $install/etc/rpc $fs/etc
    1.66 +			touch $fs/etc/ld.so.conf ;;
    1.67 +		*)
    1.68 +			# Mkdir's.
    1.69 +			for dir in $(cat $stuff/mkdir.list)
    1.70 +			do
    1.71 +				mkdir -p ${fs}$dir
    1.72 +			done
    1.73 +		    # Copy all files specified in stuff/files.list. We get the files
    1.74 +		    # from glibc package.
    1.75 +		    for file in $(cat $stuff/wanted-files.list)
    1.76 +		    do
    1.77 +		    	cp -a ${_pkg}$file ${fs}$file
    1.78 +		    done
    1.79 +		    # i18n
    1.80 +		    for i in $DEFAULT_LOCALE
    1.81 +			do
    1.82 +				cp $install/usr/share/i18n/locales/$i \
    1.83 +					$fs/usr/share/i18n/locales
    1.84 +			done
    1.85 +	esac
    1.86  }
    1.87  
    1.88  # Remove an eventual locale-archive since we use directories.