wok-current view slitaz-toolchain/receipt @ rev 9987
Add sic
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed May 18 23:33:46 2011 +0200 (2011-05-18) |
parents | a7822340cb8c |
children | d131d9604342 |
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 #
13 # The goal here is to build and install SliTaz toolchain. We build the toolchain
14 # from SliTaz packages, on SliTaz and for SliTaz so in case of new and important
15 # toolchain upgrade we must build Binutils a first time, then GCC so it use the
16 # new Binutils. After we cook Glibc and then rebuild Binutils + GCC a second
17 # time so they are linked with the new main GNU libc. We usually also due a
18 # bootstrap by recooking slitaz-toolchain a second time so we are sure it can
19 # rebuild itself.
20 #
21 # SliTaz does one big toolchain by year just after the stable release, any change
22 # here or in the toolchain packages version must be discuss on the mailing list.
23 #
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 [ -x /usr/bin/cook ] || exit 0
29 tmplog=$LOGS/$PACKAGE.tmplog
30 echo "Cook: $PACKAGE $VERSION" > $tmplog
31 separator >> $tmplog
32 echo "cook: started $(date '+%Y-%m-%d %H:%M')" >> $tmplog
34 # 1. binutils (first pass)
35 echo "cook: binutils first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
36 cook binutils --install
38 # 2. gcc (first pass)
39 echo "cook: GCC first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
40 cook gcc --install --first-pass
41 cook gcc-lib-base --install
42 cook libobjc --install
44 # 3. linux-api-headers
45 echo "cook: linux API headers: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
46 cook linux-api-headers --install
48 # 4. glibc
49 for i in glibc glibc-base glibc-extra-samba glibc-locale glibc-dev
50 do
51 echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
52 cook $i --install
53 done
55 # 5. binutils (final)
56 echo "cook: binutils final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
57 cook binutils --install
59 # 6. gcc (final)
60 echo "cook: GCC final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
61 cook gcc --install
62 cook gcc-lib-base --install
63 cook libobjc --install
65 # All packages cooked got ther own log so we dont keep them.
66 separator >> $tmplog && echo "" >> $tmplog
67 mv -f $tmplog $LOGS/$PACKAGE.log
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 binutils=$(grep ^VERSION $WOK/binutils/receipt | cut -d '"' -f 2)
74 linux=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
75 gcc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
76 glibc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
78 mkdir -p $fs/usr/share/doc/slitaz
79 cat > $fs/usr/share/doc/slitaz/toolchain.txt << EOT
80 SliTaz GNU/Linux toolchain
81 ================================================================================
82 Build date: $(date "+%Y-%m-%d")
83 Packages:
85 * Binutils $binutils
86 * Linux API headers $linux
87 * GCC $gcc
88 * Glibc $glibc
90 ================================================================================
92 EOT
93 }