95617f0dfc87144ee81f24a366f919907b0e1fb8
[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.3.6
6 # [S] 2-3
7 # [D] glibc-2.3.6.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/
8 # [D] glibc-linuxthreads-2.3.6.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 "creating some files needed for build ..."
21         mkdir -p $prefix/etc
22         [ ! -f $root/etc/ld.so.conf ] && touch $root/etc/ld.so.conf
23         [ ! -c $root/dev/null ] && mknod -m 0666 $root/dev/null c 1 3
24         echo "done (file creating)"
25
26         echo "patching ..."
27         sed 's/vi_VN.TCVN/d' localedata/SUPPORTED > tmp~
28         mv tmp~ localedata/SUPPORTED
29         echo "patching install test (warning, might not work for every arch)"
30         sed -e \
31         's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
32         scripts/test-installation.pl > tmp~
33         mv tmp~ scripts/test-installation.pl
34                 }
35
36 build_main()    {
37         # create and change to seperated build directory
38         mkdir -p ../glibc-build &&
39         cd ../glibc-build
40
41         # configure and prepare Makefile
42         ../glibc${extraver}/configure $confopt
43
44         # build and install
45         make && make install && make localedata/install-locales
46                 }