wok annotate slitaz-toolchain/receipt @ rev 9783

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