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