wok view slitaz-toolchain/receipt @ rev 10045

Up: xz to 5.0.2. Add $CONFIGURE_ARGS.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri May 20 03:41:53 2011 +0000 (2011-05-20)
parents d131d9604342
children 77cd6a3007d1
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-toolchain"
4 VERSION="4.0"
5 CATEGORY="meta"
6 SHORT_DESC="SliTaz meta package to rebuild or install current toolchain."
7 MAINTAINER="pankso@slitaz.org"
8 WEB_SITE="http://www.slitaz.org/"
10 DEPENDS="binutils linux-api-headers glibc-dev gcc make elfkickers"
12 # The goal here is to build and install SliTaz toolchain. We build the toolchain
13 # from SliTaz packages, on SliTaz and for SliTaz so in case of new and important
14 # toolchain upgrade we must build Binutils a first time, then GCC so it use the
15 # new Binutils. After we cook Glibc and then rebuild Binutils + GCC a second
16 # time so they are linked with the new main GNU libc. We usually also due a
17 # bootstrap by recooking slitaz-toolchain a second time so we are sure it can
18 # rebuild itself.
19 #
20 # SliTaz does one big toolchain by year just after the stable release, any change
21 # here or in the toolchain packages version must be discuss on the mailing list.
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 [ -x /usr/bin/cook ] || exit 0
27 tmplog=$LOGS/$PACKAGE.tmplog
28 echo "Cook: $PACKAGE $VERSION" > $tmplog
29 separator >> $tmplog
30 cat >> $tmplog << EOT
31 cook toolchain : started $(date "+%Y-%m-%d %H:%M")
32 build system : $BUILD_SYSTEM
33 host system : $HOST_SYSTEM
34 EOT
36 # 1. binutils (first pass)
37 echo "cook: binutils first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
38 cook binutils --install
40 # 2. gcc (first pass)
41 echo "cook: GCC first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
42 cook gcc --install --first-pass
43 cook gcc-lib-base --install
45 # 3. linux-api-headers
46 echo "cook: linux API headers: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
47 cook linux-api-headers --install
49 # 4. glibc
50 for i in glibc glibc-base glibc-extra-samba glibc-locale glibc-dev
51 do
52 echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
53 cook $i --install
54 done
56 # 5. binutils (final)
57 echo "cook: binutils final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
58 cook binutils --install
60 # 6. gcc (final)
61 echo "cook: GCC final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
62 for i in gcc gcc-lib-base libobjc
63 do
64 echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
65 cook $i --install
66 done
67 cook libgfortran
68 cook gfortran
70 # All packages cooked got ther own log so we dont keep them.
71 separator >> $tmplog && echo "" >> $tmplog
72 mv -f $tmplog $LOGS/$PACKAGE.log
73 }
75 # Rules to gen a SliTaz package suitable for Tazpkg.
76 genpkg_rules()
77 {
78 binutils=$(grep ^VERSION $WOK/binutils/receipt | cut -d '"' -f 2)
79 linux=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
80 gcc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
81 glibc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
83 mkdir -p $fs/usr/share/doc/slitaz
84 cat > $fs/usr/share/doc/slitaz/toolchain.txt << EOT
85 SliTaz GNU/Linux toolchain
86 ================================================================================
88 Build date : $(date "+%Y-%m-%d")
89 Build system : $BUILD_SYSTEM
90 Host system : $HOST_SYSTEM
92 Packages:
94 * Binutils $binutils
95 * Linux API headers $linux
96 * GCC $gcc
97 * Glibc $glibc
99 Documentation: http://doc.slitaz.org/en:cookbook:toolchain
101 ================================================================================
103 EOT
104 }