several changes to toolchain packages
[hdw-linux/hdw-linux.git] / packages / base / glibc / glibc
1 # hdw - linux glibc package
2 #
3 # author: hackbard@hackdaworld.dyndns.org
4 #
5 # [V] 2.5
6 # [S] 2-3
7 # [D] glibc-2.5.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
8 # [D] glibc-libidn-2.5.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
9
10 kernver=`grep '^#\ \[V\]' $confdir/../linux/linux | awk '{ print $3 }'`
11 kernver=`echo $kernver | awk -F. '{ print $1 "." $2 }'`
12 extraver="-${ver}"
13 [ "$ver" = "cvs" ] && extraver=""
14
15 confopt="$confopt --enable-add-ons --disable-profile"
16 confopt="$confopt --libexecdir=$prefix/lib/glibc --without-cvs"
17 confopt="$confopt --enable-kernel=$kernver"
18
19 pre_install()   {
20         echo "extracting libidn ..."
21         tar --use-compress-program=gzip -xvf \
22                 $archdir/glibc-libidn-${ver}.tar.bz2 
23
24         echo "creating some files needed for a proper build ..."
25         mkdir -p $prefix/etc
26         [ ! -f $root/etc/ld.so.conf ] && touch $root/etc/ld.so.conf
27         [ ! -c $root/dev/null ] && mknod -m 0666 $root/dev/null c 1 3
28         echo "done (file creating)"
29
30         echo "patching ..."
31         sed 's/vi_VN.TCVN/d' localedata/SUPPORTED > tmp~
32         mv tmp~ localedata/SUPPORTED
33         echo "patching install test (warning, might not work for every arch)"
34         sed -e \
35         's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
36         scripts/test-installation.pl > tmp~
37         mv tmp~ scripts/test-installation.pl
38                 }
39
40 build_main()    {
41         # create and change to seperated build directory
42         mkdir -p ../glibc-build &&
43         cd ../glibc-build
44
45         # configure and prepare Makefile
46         ../glibc${extraver}/configure $confopt
47
48         # build and install
49         make && make install && make localedata/install-locales
50                 }