wok annotate slitaz-toolchain/receipt @ rev 9732

linux: Fix 2. clean up and make it build with cookutils: FIXME: tazwok specif code (aufs is ok for cook and tazwok I guess)
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 09 15:57:19 2011 +0200 (2011-05-09)
parents 757a3f3c6bb1
children dad9a35bd4f6
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@9717 41
pankso@9717 42 # 3. linux-api-headers
pankso@9717 43 echo "cook: linux API headers: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
pankso@9717 44 cook linux-api-headers --install
pankso@9717 45
pankso@9717 46 # 4. glibc
pankso@9717 47 for i in glibc glibc-base glibc-extra-samba glibc-locale glibc-dev
pankso@9717 48 do
pankso@9717 49 echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
pankso@9717 50 cook $i --install
pankso@9717 51 done
pankso@9717 52
pankso@9717 53 # 5. binutils (final)
pankso@9717 54 echo "cook: binutils final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
pankso@9717 55 cook binutils --install
pankso@9717 56
pankso@9717 57 # 6. gcc (final)
pankso@9717 58 echo "cook: GCC final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
pankso@9717 59 cook gcc --install
pankso@9717 60
pankso@9717 61 # All packages cooked got ther own log so we dont keep them.
pankso@9717 62 separator >> $tmplog && echo "" >> $tmplog
pankso@9717 63 mv -f $tmplog $LOGS/$PACKAGE.log
pankso@9717 64 }
pankso@16 65
pankso@16 66 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@16 67 genpkg_rules()
pankso@16 68 {
pankso@9717 69 binutils=$(grep ^VERSION $WOK/binutils/receipt | cut -d '"' -f 2)
pankso@9717 70 linux=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
pankso@9717 71 gcc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
pankso@9717 72 glibc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
pankso@9717 73
pankso@9718 74 mkdir -p $fs/usr/share/doc/slitaz
pankso@9718 75 cat > $fs/usr/share/doc/slitaz/toolchain.txt << EOT
pankso@9717 76 SliTaz GNU/Linux toolchain
pankso@9717 77 ================================================================================
pankso@9717 78 Build date: $(date "+%Y-%m-%d")
pankso@9717 79 Packages:
pankso@9717 80
pankso@9717 81 * Binutils $binutils
pankso@9717 82 * Linux API headers $linux
pankso@9717 83 * GCC $gcc
pankso@9717 84 * Glibc $glibc
pankso@9717 85
pankso@9717 86 ================================================================================
pankso@9717 87
pankso@9717 88 EOT
pankso@16 89 }