wok-next view glibc-base/receipt @ rev 19650
Complete xorg-fonts.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Feb 25 14:11:16 2017 +0200 (2017-02-25) |
parents | 6b0977689017 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="glibc-base"
4 VERSION="2.24"
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 LICENSE="GPL2"
10 HOST_ARCH="i486 arm x86_64"
12 WANTED="glibc"
14 # Locales include by default, other locales are in: locale-** and glibc-locale
15 DEFAULT_LOCALE="en_US en_GB"
17 # Handle multiarch compilation.
18 case "$ARCH" in
19 arm*|x86_64) VERSION="2.13" WANTED="" ;;
20 esac
22 # Handle multiarch installation.
23 case "$SLITAZ_ARCH" in
24 arm*|x86_64) VERSION="2.13" WANTED="" ;;
25 esac
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 #
29 # Full glibc is very long to compile (see package glibc for more
30 # informations). You can use the precompiled package available on
31 # SliTaz mirror to build a distro without recompiling glibc.
32 #
34 # i18n
35 get_locales()
36 {
37 local path=$1
38 for i in $DEFAULT_LOCALE; do
39 cp $install/$path/i18n/locales/$i $fs/usr/share/i18n/locales
40 done
41 }
43 genpkg_rules()
44 {
45 case "$ARCH" in
46 arm*)
47 # Mkdir's.
48 for dir in $(cat $stuff/mkdir.list)
49 do
50 mkdir -p ${fs}$dir
51 done
53 # Eglibc is cross compiled by cross to have a toolchain so we can
54 # use these files instead of recooking it. ARM use Eglibc
55 echo "Using cross compiled Eglibc..."
56 install=/cross/$ARCH/sysroot
58 # /usr/{bin,share} /usr/lib/gconv
59 for file in $(cat $stuff/arm-files.list)
60 do
61 cp -a ${install}$file ${fs}$file
62 done
64 # libs
65 for lib in libcrypt libm libc libresolv librt libutil libpthread \
66 libnss_* libnsl libanl libdl
67 do
68 cp -a $install/lib/${lib}-*.so $fs/lib
69 cp -a $install/lib/${lib}.so* $fs/lib
70 cp -a $install/usr/lib/${lib}.so $fs/usr/lib
71 done
72 cp -a $install/lib/ld-*.so* $fs/lib
73 cp -a $install/usr/lib/libc_nonshared.a $fs/usr/lib
74 cp -a $install/usr/lib/libpthread_nonshared.a $fs/usr/lib
75 cp $install/etc/rpc $fs/etc
76 touch $fs/etc/ld.so.conf
77 touch $fs/etc/ld.so.cache
78 get_locales "usr/share" ;;
79 x86_64)
80 # Mkdir's.
81 for dir in $(cat $stuff/mkdir.list)
82 do
83 mkdir -p ${fs}$dir
84 done
86 # EXPERIMENTAL: Glibc is cross compiled by cross to have a
87 # toolchain so we can use these files instead of recooking it.
88 echo "Using cross compiled Glibc..."
89 install=/usr/cross/$ARCH
91 # /usr/{bin,share} /usr/lib/gconv
92 for file in $(cat $stuff/arm-files.list)
93 do
94 cp -a ${install}$file ${fs}/usr/$file
95 done
97 # /lib
98 for lib in libcrypt libm libc libresolv librt libutil libpthread \
99 libnss_* libnsl libanl libdl
100 do
101 cp -a $install/lib/${lib}-*.so $fs/lib
102 cp -a $install/lib/${lib}.so* $fs/lib
103 done
104 cp -a $install/lib/ld-*.so* $fs/lib
105 cp -a $install/lib/libc_nonshared.a $fs/lib
106 cp -a $install/lib/libpthread_nonshared.a $fs/lib
107 cp $install/etc/rpc $fs/etc
108 touch $fs/etc/ld.so.conf
109 get_locales "share"
110 # Fix libraries search path
111 sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libc.so
112 sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libpthread.so ;;
113 *)
114 cook_copy_files \
115 ld-*.so* ld.so* \
116 libanl-*.so* libanl.so* \
117 libc-*.so* libc.so* \
118 libcrypt-*.so* libcrypt.so* \
119 libdl-*.so* libdl.so* \
120 libm-*.so* libm.so* \
121 libnsl-*.so* libnsl.so* \
122 libnss_compat-*.so* libnss_compat.so* \
123 libnss_dns-*.so* libnss_dns.so* \
124 libnss_files-*.so* libnss_files.so* \
125 libpthread-*.so* libpthread.so* \
126 libresolv-*.so* libresolv.so* \
127 librt-*.so* librt.so* \
128 libthread_db-*.so* libthread_db.so* \
129 libutil-*.so* libutil.so* \
130 \
131 UNICODE.so gconv-modules ANSI_X3.110.so ISO8859-1.so \
132 ISO8859-15.so UTF-16.so CP1252.so IBM437.so IBM850.so \
133 \
134 i18n iso14651_t1 iso14651_t1_common translit_neutral \
135 translit_combining translit_circle translit_cjk_compat \
136 translit_compat translit_font translit_fraction translit_narrow \
137 translit_small translit_wide \
138 \
139 locale localedef locale.alias UTF-8.gz UTC rpc \
140 $DEFAULT_LOCALE
141 mkdir -p $fs/etc
142 cp $stuff/nsswitch.conf $fs/etc
143 esac
144 }
146 # Remove an eventual locale-archive since we use directories.
147 pre_install()
148 {
149 rm -f $root/usr/lib/locale/locale-archive
150 }
152 # Glibc-base is auto-updated in chroot but when cross-compiling we need
153 # to have /usr/cross/$ARCH search path in libc.so
154 post_install()
155 {
156 # x86_64
157 if echo $root | grep -q /usr/cross/x86_64; then
158 echo "Fixing x86_64: $root/lib/libc.so"
159 cat > $root/lib/libc.so << EOT
160 OUTPUT_FORMAT(elf64-x86-64)
161 GROUP ( $root/lib/libc.so.6 $root/lib/libc_nonshared.a AS_NEEDED ( $root/lib/ld-linux-x86-64.so.2 ) )
162 EOT
163 fi
164 }