wok-next view slitaz-toolchain/receipt @ rev 20088
Up dahdi-linux, dahdi-tools (2.11.1) again
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Oct 27 22:42:13 2017 +0200 (2017-10-27) |
parents | c963361d3d54 |
children | 0e7893ac206d |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slitaz-toolchain"
4 VERSION="6.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 # The goal here is to build and install SliTaz toolchain. We build the toolchain
12 # from SliTaz packages, on SliTaz and for SliTaz so in case of new and important
13 # toolchain upgrade we must build Binutils a first time, then GCC so it use the
14 # new Binutils. After we cook Glibc and then rebuild Binutils + GCC a second
15 # time so they are linked with the new main GNU libc. We usually also due a
16 # bootstrap by recooking slitaz-toolchain a second time so we are sure it can
17 # rebuild itself.
18 #
19 # SliTaz does one big toolchain by year just after the stable release, any change
20 # here or in the toolchain packages version must be discuss on the mailing list.
22 ver() { grep ^VERSION $WOK/$1/receipt | cut -d '"' -f2; }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 [ -x /usr/bin/cook ] || return 0
29 tmplog=$LOGS/$PACKAGE.tmplog
31 cat > $tmplog <<EOT
32 Cook: $PACKAGE $VERSION
33 $(separator)
34 Cook toolchain : started $(date '+%F %R')
35 Architecture : $ARCH
36 Build system : $BUILD_SYSTEM
37 Host system : $HOST_SYSTEM
38 $(separator -)
39 EOT
41 echo "cook: Binutils first pass : $(date '+%F %R')" >> $tmplog
42 cook binutils
43 echo "cook: GCC first pass : $(date '+%F %R')" >> $tmplog
44 cook gcc --first-pass
45 echo "cook: Linux API headers : $(date '+%F %R')" >> $tmplog
46 cook linux-api-headers
47 echo "cook: Glibc : $(date '+%F %R')" >> $tmplog
48 cook glibc
49 echo "cook: Binutils final : $(date '+%F %R')" >> $tmplog
50 cook binutils
51 echo "cook: GCC final : $(date '+%F %R')" >> $tmplog
52 cook gcc
54 cat >> $tmplog <<EOT
55 $(separator)
57 GCC compiler information
58 $(separator)
59 $(gcc -v 2>&1 | sed 's|--|\n --|g')
60 $(separator)
62 EOT
64 # All packages cooked got ther own log so we don't keep them.
65 mv -f $tmplog $LOGS/$PACKAGE.log
67 mkdir -p $install/usr/share/doc/slitaz
68 cat > $install/usr/share/doc/slitaz/toolchain.txt <<EOT
69 SliTaz GNU/Linux toolchain
70 ================================================================================
72 Build date : $(date "+%F")
73 Architecture : $ARCH
74 Build system : $BUILD_SYSTEM
75 Host system : $HOST_SYSTEM
77 Packages:
79 * Binutils $(ver binutils)
80 * Linux API headers $(ver linux-api-headers)
81 * GCC $(ver gcc)
82 * Glibc $(ver glibc)
84 Toolchain documentation: http://doc.slitaz.org/en:cookbook:toolchain
86 ================================================================================
88 EOT
89 }
91 # Rules to gen a SliTaz package suitable for Tazpkg.
92 genpkg_rules()
93 {
94 copy @std
95 DEPENDS="binutils linux-api-headers glibc-dev gcc make elfkickers"
96 }