wok-6.x annotate glibc-base/receipt @ rev 17358

Add asterisk-speech-recog
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 18 21:43:05 2014 +0100 (2014-11-18)
parents f398031ad845
children c45e9f534acb
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"
pascal@15000 9 LICENSE="GPL2"
pankso@12820 10 WANTED="glibc"
pankso@12835 11 HOST_ARCH="i486 arm x86_64"
pankso@12804 12
al@16451 13 # Locales include by default, other locales are in: locale-** and glibc-locale
al@16451 14 DEFAULT_LOCALE="en_US en_GB"
pankso@12820 15
pankso@12820 16 # Handle multiarch compilation.
pankso@12804 17 case "$ARCH" in
pankso@16528 18 arm*|x86_64) VERSION="2.13" WANTED="" ;;
pankso@12916 19 esac
pankso@12916 20
pankso@12916 21 # Handle multiarch installation.
pankso@12916 22 case "$SLITAZ_ARCH" in
pankso@16528 23 arm*|x86_64) VERSION="2.13" WANTED="" ;;
pankso@12804 24 esac
pankso@2 25
pankso@2 26 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@2 27 #
pankso@2 28 # Full glibc is very long to compile (see package glibc for more
pankso@2 29 # informations). You can use the precompiled package available on
pankso@2 30 # SliTaz mirror to build a distro without recompiling glibc.
pankso@2 31 #
pankso@12881 32
pankso@12881 33 # i18n
pankso@12881 34 get_locales()
pankso@12881 35 {
pankso@12881 36 local path=$1
al@16433 37 for i in $DEFAULT_LOCALE
pankso@12881 38 do
pankso@12881 39 cp $install/$path/i18n/locales/$i $fs/usr/share/i18n/locales
pankso@12881 40 done
pankso@12881 41 }
pankso@12881 42
pankso@2 43 genpkg_rules()
pankso@2 44 {
pankso@12881 45 # Mkdir's.
pankso@12881 46 for dir in $(cat $stuff/mkdir.list)
pankso@12881 47 do
pankso@12881 48 mkdir -p ${fs}$dir
pankso@12881 49 done
pankso@12881 50
pankso@12804 51 case "$ARCH" in
pankso@16528 52 arm*)
pankso@12911 53 # Eglibc is cross compiled by cross to have a toolchain so we can
pankso@12911 54 # use these files instead of recooking it. ARM use Eglibc
pankso@12911 55 echo "Using cross compiled Eglibc..."
pankso@12911 56 install=/cross/$ARCH/sysroot
pankso@12911 57
pankso@12911 58 # /usr/{bin,share} /usr/lib/gconv
pankso@12911 59 for file in $(cat $stuff/arm-files.list)
al@16433 60 do
al@16433 61 cp -a ${install}$file ${fs}$file
al@16433 62 done
pankso@12911 63
pankso@12911 64 # libs
pankso@12911 65 for lib in libcrypt libm libc libresolv librt libutil libpthread \
pankso@12911 66 libnss_* libnsl libanl libdl
pankso@12911 67 do
pankso@12911 68 cp -a $install/lib/${lib}-*.so $fs/lib
pankso@12911 69 cp -a $install/lib/${lib}.so* $fs/lib
pankso@12911 70 cp -a $install/usr/lib/${lib}.so $fs/usr/lib
pankso@12911 71 done
pankso@12911 72 cp -a $install/lib/ld-*.so* $fs/lib
pankso@12911 73 cp -a $install/usr/lib/libc_nonshared.a $fs/usr/lib
pankso@12911 74 cp -a $install/usr/lib/libpthread_nonshared.a $fs/usr/lib
pankso@12911 75 cp $install/etc/rpc $fs/etc
pankso@12911 76 touch $fs/etc/ld.so.conf
pankso@12911 77 touch $fs/etc/ld.so.cache
pankso@12911 78 get_locales "usr/share" ;;
pankso@12911 79 x86_64)
pankso@12804 80 # EXPERIMENTAL: Glibc is cross compiled by cross to have a
pankso@12804 81 # toolchain so we can use these files instead of recooking it.
pankso@12820 82 echo "Using cross compiled Glibc..."
pankso@12804 83 install=/usr/cross/$ARCH
pankso@12881 84
pankso@12881 85 # /usr/{bin,share} /usr/lib/gconv
pankso@12881 86 for file in $(cat $stuff/arm-files.list)
al@16433 87 do
al@16433 88 cp -a ${install}$file ${fs}/usr/$file
al@16433 89 done
pankso@12881 90
pankso@12829 91 # /lib
pankso@12881 92 for lib in libcrypt libm libc libresolv librt libutil libpthread \
pankso@12881 93 libnss_* libnsl libanl libdl
pankso@12804 94 do
pankso@12814 95 cp -a $install/lib/${lib}-*.so $fs/lib
pankso@12814 96 cp -a $install/lib/${lib}.so* $fs/lib
pankso@12804 97 done
pankso@12814 98 cp -a $install/lib/ld-*.so* $fs/lib
pankso@12814 99 cp -a $install/lib/libc_nonshared.a $fs/lib
pankso@12881 100 cp -a $install/lib/libpthread_nonshared.a $fs/lib
pankso@12804 101 cp $install/etc/rpc $fs/etc
pankso@12814 102 touch $fs/etc/ld.so.conf
pankso@12881 103 get_locales "share"
pankso@12814 104 # Fix libraries search path
pankso@12881 105 sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libc.so
pankso@12881 106 sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libpthread.so ;;
pankso@12804 107 *)
al@16433 108 # Copy all files specified in stuff/files.list. We get the files
al@16433 109 # from glibc package.
al@16433 110 for file in $(cat $stuff/wanted-files.list)
al@16433 111 do
al@16433 112 cp -a ${install}$file ${fs}$file
al@16433 113 done
al@16433 114 get_locales "usr/share"
pankso@12804 115 esac
pankso@2 116 }
pankso@528 117
pankso@9715 118 # Remove an eventual locale-archive since we use directories.
pankso@2701 119 pre_install()
pankso@2701 120 {
pankso@12820 121 rm -f $root/usr/lib/locale/locale-archive
pankso@2701 122 }
pankso@12820 123
pankso@12820 124 # Glibc-base is auto-updated in chroot but when cross-compiling we need
pankso@12820 125 # to have /usr/cross/$ARCH search path in libc.so
pankso@12820 126 post_install()
pankso@12820 127 {
pankso@12835 128 # x86_64
pankso@12835 129 if echo $root | grep -q /usr/cross/x86_64; then
pankso@12835 130 echo "Fixing x86_64: $root/lib/libc.so"
pankso@12835 131 cat > $root/lib/libc.so << EOT
pankso@12835 132 OUTPUT_FORMAT(elf64-x86-64)
pankso@12835 133 GROUP ( $root/lib/libc.so.6 $root/lib/libc_nonshared.a AS_NEEDED ( $root/lib/ld-linux-x86-64.so.2 ) )
pankso@12835 134 EOT
pankso@12835 135 fi
pankso@12820 136 }