wok-6.x rev 9717
slitaz-toolchain: Let create a new toolchain in one command for cookutils
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 09 01:35:10 2011 +0200 (2011-05-09) |
parents | 9280727ea775 |
children | a7822340cb8c |
files | slitaz-toolchain/receipt |
line diff
1.1 --- a/slitaz-toolchain/receipt Mon May 09 01:15:14 2011 +0200 1.2 +++ b/slitaz-toolchain/receipt Mon May 09 01:35:10 2011 +0200 1.3 @@ -1,15 +1,89 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="slitaz-toolchain" 1.7 -VERSION="1.0" 1.8 +VERSION="4.0" 1.9 CATEGORY="meta" 1.10 -SHORT_DESC="SliTaz toolchain meta package for devel." 1.11 +SHORT_DESC="SliTaz meta package to rebuild or install current toolchain." 1.12 MAINTAINER="pankso@slitaz.org" 1.13 +WEB_SITE="http://www.slitaz.org/" 1.14 + 1.15 DEPENDS="binutils linux-api-headers glibc-dev gcc make elfkickers" 1.16 -WEB_SITE="http://www.slitaz.org/" 1.17 + 1.18 +# 1.19 +# The goal here is to build and install SliTaz toolchain. We build the toolchain 1.20 +# from SliTaz packages, on SliTaz and for SliTaz so in case of new and important 1.21 +# toolchain upgrade we must build Binutils a first time, then GCC so it use the 1.22 +# new Binutils. After we cook Glibc and then rebuild Binutils + GCC a second 1.23 +# time so they are linked with the new main GNU libc. We usually also due a 1.24 +# bootstrap by recooking slitaz-toolchain a second time so we are sure it can 1.25 +# rebuild itself. 1.26 +# 1.27 +# SliTaz does one big toolchain by year just after the stable release, any change 1.28 +# here or in the toolchain packages version must be discuss on the mailing list. 1.29 +# 1.30 + 1.31 +# Rules to configure and make the package. 1.32 +compile_rules() 1.33 +{ 1.34 + [ -x /usr/bin/cook ] || exit 0 1.35 + tmplog=$LOGS/$PACKAGE.tmplog 1.36 + echo "Cook: $PACKAGE $VERSION" > $tmplog 1.37 + separator >> $tmplog 1.38 + echo "cook: started $(date '+%Y-%m-%d %H:%M')" >> $tmplog 1.39 + 1.40 + # 1. binutils (first pass) 1.41 + echo "cook: binutils first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog 1.42 + cook binutils --install 1.43 + 1.44 + # 2. gcc (first pass) 1.45 + echo "cook: GCC first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog 1.46 + cook gcc --install --first-pass 1.47 + 1.48 + # 3. linux-api-headers 1.49 + echo "cook: linux API headers: $(date '+%Y-%m-%d %H:%M')" >> $tmplog 1.50 + cook linux-api-headers --install 1.51 + 1.52 + # 4. glibc 1.53 + for i in glibc glibc-base glibc-extra-samba glibc-locale glibc-dev 1.54 + do 1.55 + echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog 1.56 + cook $i --install 1.57 + done 1.58 + 1.59 + # 5. binutils (final) 1.60 + echo "cook: binutils final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog 1.61 + cook binutils --install 1.62 + 1.63 + # 6. gcc (final) 1.64 + echo "cook: GCC final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog 1.65 + cook gcc --install 1.66 + 1.67 + # All packages cooked got ther own log so we dont keep them. 1.68 + separator >> $tmplog && echo "" >> $tmplog 1.69 + mv -f $tmplog $LOGS/$PACKAGE.log 1.70 +} 1.71 1.72 # Rules to gen a SliTaz package suitable for Tazpkg. 1.73 genpkg_rules() 1.74 { 1.75 - mkdir -p $fs/var 1.76 + binutils=$(grep ^VERSION $WOK/binutils/receipt | cut -d '"' -f 2) 1.77 + linux=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2) 1.78 + gcc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2) 1.79 + glibc=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2) 1.80 + 1.81 + mkdir -p $fs/usr/share/slitaz 1.82 + cat >> $fs/usr/share/slitaz/toolchain.txt << EOT 1.83 +SliTaz GNU/Linux toolchain 1.84 +================================================================================ 1.85 +Build date: $(date "+%Y-%m-%d") 1.86 +Packages: 1.87 + 1.88 + * Binutils $binutils 1.89 + * Linux API headers $linux 1.90 + * GCC $gcc 1.91 + * Glibc $glibc 1.92 + 1.93 +================================================================================ 1.94 + 1.95 +EOT 1.96 }