wok-6.x view slitaz-toolchain/receipt @ rev 14461
Up: geany (1.23)
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sat Apr 27 02:56:24 2013 +0200 (2013-04-27) |
parents | 30290f07d3ed |
children | 3b4e4318134e |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-toolchain"
4 VERSION="5.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 ] || return 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 Architecture : $ARCH
33 Build system : $BUILD_SYSTEM
34 Host system : $HOST_SYSTEM
35 EOT
37 # 1. binutils (first pass)
38 echo "cook: binutils first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
39 cook binutils --install
41 # 2. gcc (first pass)
42 echo "cook: GCC first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
43 cook gcc --install --first-pass
44 cook gcc-lib-base --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 for i in gcc gcc-lib-base libobjc libgomp
64 do
65 echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
66 cook $i --install
67 done
68 cook libgfortran
69 cook gfortran
70 separator >> $tmplog
72 # GCC info in toolchain.log
73 echo -e "\nGCC compiler information" >> $tmplog
74 separator >> $tmplog
75 gcc -v 2>> $tmplog
77 # All packages cooked got ther own log so we dont keep them.
78 separator >> $tmplog && echo "" >> $tmplog
79 mv -f $tmplog $LOGS/$PACKAGE.log
80 }
82 # Rules to gen a SliTaz package suitable for Tazpkg.
83 genpkg_rules()
84 {
85 binutils=$(grep ^VERSION $WOK/binutils/receipt | cut -d '"' -f 2)
86 linux=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
87 gcc=$(grep ^VERSION $WOK/gcc/receipt | cut -d '"' -f 2)
88 glibc=$(grep ^VERSION $WOK/glibc/receipt | cut -d '"' -f 2)
90 mkdir -p $fs/usr/share/doc/slitaz
91 cat > $fs/usr/share/doc/slitaz/toolchain.txt << EOT
92 SliTaz GNU/Linux toolchain
93 ================================================================================
95 Build date : $(date "+%Y-%m-%d")
96 Architecture : $ARCH
97 Build system : $BUILD_SYSTEM
98 Host system : $HOST_SYSTEM
100 Packages:
102 * Binutils $binutils
103 * Linux API headers $linux
104 * GCC $gcc
105 * Glibc $glibc
107 Toolchain documentation: http://doc.slitaz.org/en:cookbook:toolchain
109 ================================================================================
111 EOT
112 }