wok-stable view slitaz-toolchain/receipt @ rev 10035

slitaz-toolchain: add build and host info to log and doc
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 20 04:19:01 2011 +0200 (2011-05-20)
parents dad9a35bd4f6
children 560bead4e358
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
44 cook libobjc --install
46 # 3. linux-api-headers
47 echo "cook: linux API headers: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
48 cook linux-api-headers --install
50 # 4. glibc
51 for i in glibc glibc-base glibc-extra-samba glibc-locale glibc-dev
52 do
53 echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
54 cook $i --install
55 done
57 # 5. binutils (final)
58 echo "cook: binutils final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
59 cook binutils --install
61 # 6. gcc (final)
62 echo "cook: GCC final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
63 cook gcc --install
64 cook gcc-lib-base --install
65 cook libobjc --install
67 # All packages cooked got ther own log so we dont keep them.
68 separator >> $tmplog && echo "" >> $tmplog
69 mv -f $tmplog $LOGS/$PACKAGE.log
70 }
72 # Rules to gen a SliTaz package suitable for Tazpkg.
73 genpkg_rules()
74 {
75 binutils=$(grep ^VERSION $WOK/binutils/receipt | cut -d '"' -f 2)
76 linux=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
77 gcc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
78 glibc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
80 mkdir -p $fs/usr/share/doc/slitaz
81 cat > $fs/usr/share/doc/slitaz/toolchain.txt << EOT
82 SliTaz GNU/Linux toolchain
83 ================================================================================
84 Build date : $(date "+%Y-%m-%d")
85 Build system : $BUILD_SYSTEM
86 Host system : $HOST_SYSTEM
88 Packages:
90 * Binutils $binutils
91 * Linux API headers $linux
92 * GCC $gcc
93 * Glibc $glibc
95 ================================================================================
97 EOT
98 }