wok-next annotate glibc-base/receipt @ rev 12835
Add xz and custom glibc-base to x86_64
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 22 18:12:44 2012 +0200 (2012-05-22) |
parents | 98e7fe8d84f0 |
children | 4d4b18813d25 |
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@12835 | 10 HOST_ARCH="i486 arm x86_64" |
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@12835 | 17 arm|x86_64) 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@12835 | 29 arm|x86_64) |
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@12820 | 32 echo "Using cross compiled Glibc..." |
pankso@12804 | 33 install=/usr/cross/$ARCH |
pankso@12829 | 34 mkdir -p $fs/lib $fs/etc $fs/usr/bin \ |
pankso@12829 | 35 $fs/usr/lib/gconv $fs/usr/share/i18n/charmaps |
pankso@12829 | 36 # /usr/bin |
pankso@12804 | 37 for bin in locale localedef |
pankso@12804 | 38 do |
pankso@12804 | 39 cp $install/bin/$bin $fs/usr/bin |
pankso@12804 | 40 done |
pankso@12829 | 41 # /lib |
pankso@12829 | 42 for lib in libcrypt libm libc libresolv librt libutil libpthread |
pankso@12804 | 43 do |
pankso@12814 | 44 cp -a $install/lib/${lib}-*.so $fs/lib |
pankso@12814 | 45 cp -a $install/lib/${lib}.so* $fs/lib |
pankso@12804 | 46 done |
pankso@12814 | 47 cp -a $install/lib/ld-*.so* $fs/lib |
pankso@12814 | 48 cp -a $install/lib/libnss_*.so* $fs/lib |
pankso@12814 | 49 cp -a $install/lib/libc_nonshared.a $fs/lib |
pankso@12804 | 50 cp $install/etc/rpc $fs/etc |
pankso@12814 | 51 touch $fs/etc/ld.so.conf |
pankso@12829 | 52 # i18n |
pankso@12829 | 53 cp $install/lib/gconv/UNICODE.so $fs/usr/lib/gconv |
pankso@12829 | 54 #cp -a $install/share/i18n/charmaps/UTF-8.gz \ |
pankso@12829 | 55 #$fs/usr/share/i18n/charmaps |
pankso@12814 | 56 # Fix libraries search path |
pankso@12835 | 57 sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libc.so ;; |
pankso@12804 | 58 *) |
pankso@12804 | 59 # Mkdir's. |
pankso@12804 | 60 for dir in $(cat $stuff/mkdir.list) |
pankso@12804 | 61 do |
pankso@12804 | 62 mkdir -p ${fs}$dir |
pankso@12804 | 63 done |
pankso@12804 | 64 # Copy all files specified in stuff/files.list. We get the files |
pankso@12804 | 65 # from glibc package. |
pankso@12804 | 66 for file in $(cat $stuff/wanted-files.list) |
pankso@12804 | 67 do |
pankso@12804 | 68 cp -a ${_pkg}$file ${fs}$file |
pankso@12804 | 69 done |
pankso@12804 | 70 # i18n |
pankso@12804 | 71 for i in $DEFAULT_LOCALE |
pankso@12804 | 72 do |
pankso@12804 | 73 cp $install/usr/share/i18n/locales/$i \ |
pankso@12804 | 74 $fs/usr/share/i18n/locales |
pankso@12804 | 75 done |
pankso@12804 | 76 esac |
pankso@2 | 77 } |
pankso@528 | 78 |
pankso@9715 | 79 # Remove an eventual locale-archive since we use directories. |
pankso@2701 | 80 pre_install() |
pankso@2701 | 81 { |
pankso@12820 | 82 rm -f $root/usr/lib/locale/locale-archive |
pankso@2701 | 83 } |
pankso@12820 | 84 |
pankso@12820 | 85 # Glibc-base is auto-updated in chroot but when cross-compiling we need |
pankso@12820 | 86 # to have /usr/cross/$ARCH search path in libc.so |
pankso@12820 | 87 post_install() |
pankso@12820 | 88 { |
pankso@12835 | 89 # x86_64 |
pankso@12835 | 90 if echo $root | grep -q /usr/cross/x86_64; then |
pankso@12835 | 91 echo "Fixing x86_64: $root/lib/libc.so" |
pankso@12835 | 92 cat > $root/lib/libc.so << EOT |
pankso@12835 | 93 OUTPUT_FORMAT(elf64-x86-64) |
pankso@12835 | 94 GROUP ( $root/lib/libc.so.6 $root/lib/libc_nonshared.a AS_NEEDED ( $root/lib/ld-linux-x86-64.so.2 ) ) |
pankso@12835 | 95 EOT |
pankso@12835 | 96 fi |
pankso@12835 | 97 # ARM |
pankso@12835 | 98 if echo $root | grep -q /usr/cross/arm; then |
pankso@12835 | 99 echo "Fixing arm: $root/lib/libc.so" |
pankso@12823 | 100 cat > $root/lib/libc.so << EOT |
pankso@12823 | 101 OUTPUT_FORMAT(elf32-littlearm) |
pankso@12823 | 102 GROUP ( $root/lib/libc.so.6 $root/lib/libc_nonshared.a AS_NEEDED ( $root/lib/ld-linux.so.3 ) ) |
pankso@12823 | 103 EOT |
pankso@12820 | 104 fi |
pankso@12820 | 105 } |