wok view glibc-base/receipt @ rev 12834
dropbear: prepa for ARM and SCPPROGRESS=1
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 22 17:21:11 2012 +0200 (2012-05-22) |
parents | 0e6f6c60f891 |
children | b61c615f20eb |
line source
1 # SliTaz package receipt.
3 PACKAGE="glibc-base"
4 VERSION="2.14.1"
5 CATEGORY="base-system"
6 SHORT_DESC="GNU libc minimal libraries and UTF-8 support for SliTaz."
7 WEB_SITE="http://www.gnu.org/software/libc/"
8 MAINTAINER="pankso@slitaz.org"
9 WANTED="glibc"
10 HOST_ARCH="i486 arm"
12 # Locales include by default, other locales are in: glibc-locale
13 DEFAULT_LOCALE="de_DE en_US en_GB es_ES fr_FR it_IT pt_BR pt_PT ru_RU"
15 # Handle multiarch compilation.
16 case "$ARCH" in
17 arm) VERSION="2.13" WANTED="" ;;
18 esac
20 # Rules to gen a SliTaz package suitable for Tazpkg.
21 #
22 # Full glibc is very long to compile (see package glibc for more
23 # informations). You can use the precompiled package available on
24 # SliTaz mirror to build a distro without recompiling glibc.
25 #
26 genpkg_rules()
27 {
28 case "$ARCH" in
29 arm)
30 # EXPERIMENTAL: Glibc is cross compiled by cross to have a
31 # toolchain so we can use these files instead of recooking it.
32 # 20120514: Include just minal libs for Busybox so we can create
33 # bootable Qemu image for ARM.
34 echo "Using cross compiled Glibc..."
35 install=/usr/cross/$ARCH
36 mkdir -p $fs/lib $fs/etc $fs/usr/bin \
37 $fs/usr/lib/gconv $fs/usr/share/i18n/charmaps
38 # /usr/bin
39 for bin in locale localedef
40 do
41 cp $install/bin/$bin $fs/usr/bin
42 done
43 # /lib
44 for lib in libcrypt libm libc libresolv librt libutil libpthread
45 do
46 cp -a $install/lib/${lib}-*.so $fs/lib
47 cp -a $install/lib/${lib}.so* $fs/lib
48 done
49 cp -a $install/lib/ld-*.so* $fs/lib
50 cp -a $install/lib/libnss_*.so* $fs/lib
51 cp -a $install/lib/libc_nonshared.a $fs/lib
52 cp $install/etc/rpc $fs/etc
53 touch $fs/etc/ld.so.conf
54 # i18n
55 cp $install/lib/gconv/UNICODE.so $fs/usr/lib/gconv
56 #cp -a $install/share/i18n/charmaps/UTF-8.gz \
57 #$fs/usr/share/i18n/charmaps
58 # Fix libraries search path
59 sed -i s'|/usr/cross/arm||'g $fs/lib/libc.so ;;
60 *)
61 # Mkdir's.
62 for dir in $(cat $stuff/mkdir.list)
63 do
64 mkdir -p ${fs}$dir
65 done
66 # Copy all files specified in stuff/files.list. We get the files
67 # from glibc package.
68 for file in $(cat $stuff/wanted-files.list)
69 do
70 cp -a ${_pkg}$file ${fs}$file
71 done
72 # i18n
73 for i in $DEFAULT_LOCALE
74 do
75 cp $install/usr/share/i18n/locales/$i \
76 $fs/usr/share/i18n/locales
77 done
78 esac
79 }
81 # Remove an eventual locale-archive since we use directories.
82 pre_install()
83 {
84 rm -f $root/usr/lib/locale/locale-archive
85 }
87 # Glibc-base is auto-updated in chroot but when cross-compiling we need
88 # to have /usr/cross/$ARCH search path in libc.so
89 post_install()
90 {
91 if echo $root | grep -q /usr/cross; then
92 echo "Fixing: $root/lib/libc.so"
93 cat > $root/lib/libc.so << EOT
94 OUTPUT_FORMAT(elf32-littlearm)
95 GROUP ( $root/lib/libc.so.6 $root/lib/libc_nonshared.a AS_NEEDED ( $root/lib/ld-linux.so.3 ) )
96 EOT
97 fi
98 }