wok-undigest diff glibc-base/receipt @ rev 1144
libguess: https -> wget bdep.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 13 17:28:45 2015 +0200 (2015-03-13) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/glibc-base/receipt Fri Mar 13 17:28:45 2015 +0200 1.3 @@ -0,0 +1,136 @@ 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 +MAINTAINER="pankso@slitaz.org" 1.12 +LICENSE="GPL2" 1.13 +WANTED="glibc" 1.14 +HOST_ARCH="i486 arm x86_64" 1.15 + 1.16 +# Locales include by default, other locales are in: locale-** and glibc-locale 1.17 +DEFAULT_LOCALE="en_US en_GB" 1.18 + 1.19 +# Handle multiarch compilation. 1.20 +case "$ARCH" in 1.21 + arm*|x86_64) VERSION="2.13" WANTED="" ;; 1.22 +esac 1.23 + 1.24 +# Handle multiarch installation. 1.25 +case "$SLITAZ_ARCH" in 1.26 + arm*|x86_64) VERSION="2.13" WANTED="" ;; 1.27 +esac 1.28 + 1.29 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.30 +# 1.31 +# Full glibc is very long to compile (see package glibc for more 1.32 +# informations). You can use the precompiled package available on 1.33 +# SliTaz mirror to build a distro without recompiling glibc. 1.34 +# 1.35 + 1.36 +# i18n 1.37 +get_locales() 1.38 +{ 1.39 + local path=$1 1.40 + for i in $DEFAULT_LOCALE 1.41 + do 1.42 + cp $install/$path/i18n/locales/$i $fs/usr/share/i18n/locales 1.43 + done 1.44 +} 1.45 + 1.46 +genpkg_rules() 1.47 +{ 1.48 + # Mkdir's. 1.49 + for dir in $(cat $stuff/mkdir.list) 1.50 + do 1.51 + mkdir -p ${fs}$dir 1.52 + done 1.53 + 1.54 + case "$ARCH" in 1.55 + arm*) 1.56 + # Eglibc is cross compiled by cross to have a toolchain so we can 1.57 + # use these files instead of recooking it. ARM use Eglibc 1.58 + echo "Using cross compiled Eglibc..." 1.59 + install=/cross/$ARCH/sysroot 1.60 + 1.61 + # /usr/{bin,share} /usr/lib/gconv 1.62 + for file in $(cat $stuff/arm-files.list) 1.63 + do 1.64 + cp -a ${install}$file ${fs}$file 1.65 + done 1.66 + 1.67 + # libs 1.68 + for lib in libcrypt libm libc libresolv librt libutil libpthread \ 1.69 + libnss_* libnsl libanl libdl 1.70 + do 1.71 + cp -a $install/lib/${lib}-*.so $fs/lib 1.72 + cp -a $install/lib/${lib}.so* $fs/lib 1.73 + cp -a $install/usr/lib/${lib}.so $fs/usr/lib 1.74 + done 1.75 + cp -a $install/lib/ld-*.so* $fs/lib 1.76 + cp -a $install/usr/lib/libc_nonshared.a $fs/usr/lib 1.77 + cp -a $install/usr/lib/libpthread_nonshared.a $fs/usr/lib 1.78 + cp $install/etc/rpc $fs/etc 1.79 + touch $fs/etc/ld.so.conf 1.80 + touch $fs/etc/ld.so.cache 1.81 + get_locales "usr/share" ;; 1.82 + x86_64) 1.83 + # EXPERIMENTAL: Glibc is cross compiled by cross to have a 1.84 + # toolchain so we can use these files instead of recooking it. 1.85 + echo "Using cross compiled Glibc..." 1.86 + install=/usr/cross/$ARCH 1.87 + 1.88 + # /usr/{bin,share} /usr/lib/gconv 1.89 + for file in $(cat $stuff/arm-files.list) 1.90 + do 1.91 + cp -a ${install}$file ${fs}/usr/$file 1.92 + done 1.93 + 1.94 + # /lib 1.95 + for lib in libcrypt libm libc libresolv librt libutil libpthread \ 1.96 + libnss_* libnsl libanl libdl 1.97 + do 1.98 + cp -a $install/lib/${lib}-*.so $fs/lib 1.99 + cp -a $install/lib/${lib}.so* $fs/lib 1.100 + done 1.101 + cp -a $install/lib/ld-*.so* $fs/lib 1.102 + cp -a $install/lib/libc_nonshared.a $fs/lib 1.103 + cp -a $install/lib/libpthread_nonshared.a $fs/lib 1.104 + cp $install/etc/rpc $fs/etc 1.105 + touch $fs/etc/ld.so.conf 1.106 + get_locales "share" 1.107 + # Fix libraries search path 1.108 + sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libc.so 1.109 + sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libpthread.so ;; 1.110 + *) 1.111 + # Copy all files specified in stuff/files.list. We get the files 1.112 + # from glibc package. 1.113 + for file in $(cat $stuff/wanted-files.list) 1.114 + do 1.115 + cp -a ${install}$file ${fs}$file 1.116 + done 1.117 + get_locales "usr/share" 1.118 + esac 1.119 +} 1.120 + 1.121 +# Remove an eventual locale-archive since we use directories. 1.122 +pre_install() 1.123 +{ 1.124 + rm -f $root/usr/lib/locale/locale-archive 1.125 +} 1.126 + 1.127 +# Glibc-base is auto-updated in chroot but when cross-compiling we need 1.128 +# to have /usr/cross/$ARCH search path in libc.so 1.129 +post_install() 1.130 +{ 1.131 + # x86_64 1.132 + if echo $root | grep -q /usr/cross/x86_64; then 1.133 + echo "Fixing x86_64: $root/lib/libc.so" 1.134 + cat > $root/lib/libc.so << EOT 1.135 +OUTPUT_FORMAT(elf64-x86-64) 1.136 +GROUP ( $root/lib/libc.so.6 $root/lib/libc_nonshared.a AS_NEEDED ( $root/lib/ld-linux-x86-64.so.2 ) ) 1.137 +EOT 1.138 + fi 1.139 +}