wok view slitaz-toolchain/receipt @ rev 24419
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Feb 11 11:14:46 2022 +0000 (2022-02-11) |
parents | 3b4e4318134e |
children |
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 LICENSE="GPL2"
9 WEB_SITE="http://www.slitaz.org/"
11 DEPENDS="binutils linux-api-headers glibc-dev gcc make elfkickers"
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.
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 [ -x /usr/bin/cook ] || return 0
28 tmplog=$LOGS/$PACKAGE.tmplog
29 echo "Cook: $PACKAGE $VERSION" > $tmplog
30 separator >> $tmplog
31 cat >> $tmplog << EOT
32 Cook toolchain : started $(date "+%Y-%m-%d %H:%M")
33 Architecture : $ARCH
34 Build system : $BUILD_SYSTEM
35 Host system : $HOST_SYSTEM
36 EOT
38 # 1. binutils (first pass)
39 echo "cook: binutils first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
40 cook binutils --install
42 # 2. gcc (first pass)
43 echo "cook: GCC first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
44 cook gcc --install --first-pass
45 cook gcc-lib-base --install
47 # 3. linux-api-headers
48 echo "cook: linux API headers: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
49 cook linux-api-headers --install
51 # 4. glibc
52 for i in glibc glibc-base glibc-locale glibc-dev
53 do
54 echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
55 cook $i --install
56 done
58 # 5. binutils (final)
59 echo "cook: binutils final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
60 cook binutils --install
62 # 6. gcc (final)
63 echo "cook: GCC final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
64 for i in gcc gcc-lib-base libobjc libgomp
65 do
66 echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
67 cook $i --install
68 done
69 cook libgfortran
70 cook gfortran
71 separator >> $tmplog
73 # GCC info in toolchain.log
74 echo -e "\nGCC compiler information" >> $tmplog
75 separator >> $tmplog
76 gcc -v 2>> $tmplog
78 # All packages cooked got ther own log so we dont keep them.
79 separator >> $tmplog && echo "" >> $tmplog
80 mv -f $tmplog $LOGS/$PACKAGE.log
81 }
83 # Rules to gen a SliTaz package suitable for Tazpkg.
84 genpkg_rules()
85 {
86 binutils=$(grep ^VERSION $WOK/binutils/receipt | cut -d '"' -f 2)
87 linux=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
88 gcc=$(grep ^VERSION $WOK/gcc/receipt | cut -d '"' -f 2)
89 glibc=$(grep ^VERSION $WOK/glibc/receipt | cut -d '"' -f 2)
91 mkdir -p $fs/usr/share/doc/slitaz
92 cat > $fs/usr/share/doc/slitaz/toolchain.txt << EOT
93 SliTaz GNU/Linux toolchain
94 ================================================================================
96 Build date : $(date "+%Y-%m-%d")
97 Architecture : $ARCH
98 Build system : $BUILD_SYSTEM
99 Host system : $HOST_SYSTEM
101 Packages:
103 * Binutils $binutils
104 * Linux API headers $linux
105 * GCC $gcc
106 * Glibc $glibc
108 Toolchain documentation: http://doc.slitaz.org/en:cookbook:toolchain
110 ================================================================================
112 EOT
113 }