wok-next annotate slitaz-toolchain/receipt @ rev 19872
Up palemoon (27.5.0)
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Wed Sep 27 20:45:12 2017 +0200 (2017-09-27) |
parents | c963361d3d54 |
children | 0e7893ac206d |
rev | line source |
---|---|
al@19765 | 1 # SliTaz package receipt v2. |
pankso@16 | 2 |
pankso@16 | 3 PACKAGE="slitaz-toolchain" |
al@19561 | 4 VERSION="6.0" |
pankso@211 | 5 CATEGORY="meta" |
al@19765 | 6 SHORT_DESC="SliTaz meta package to rebuild or install current toolchain" |
pankso@16 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15593 | 8 LICENSE="GPL2" |
pankso@9717 | 9 WEB_SITE="http://www.slitaz.org/" |
pankso@9717 | 10 |
pankso@9717 | 11 # The goal here is to build and install SliTaz toolchain. We build the toolchain |
pankso@9717 | 12 # from SliTaz packages, on SliTaz and for SliTaz so in case of new and important |
pankso@9717 | 13 # toolchain upgrade we must build Binutils a first time, then GCC so it use the |
pankso@9717 | 14 # new Binutils. After we cook Glibc and then rebuild Binutils + GCC a second |
pankso@9717 | 15 # time so they are linked with the new main GNU libc. We usually also due a |
pankso@9717 | 16 # bootstrap by recooking slitaz-toolchain a second time so we are sure it can |
pankso@9717 | 17 # rebuild itself. |
pankso@9717 | 18 # |
pankso@9717 | 19 # SliTaz does one big toolchain by year just after the stable release, any change |
pankso@9717 | 20 # here or in the toolchain packages version must be discuss on the mailing list. |
pankso@9717 | 21 |
al@19765 | 22 ver() { grep ^VERSION $WOK/$1/receipt | cut -d '"' -f2; } |
al@19765 | 23 |
pankso@9717 | 24 # Rules to configure and make the package. |
pankso@9717 | 25 compile_rules() |
pankso@9717 | 26 { |
gokhlayeh@11391 | 27 [ -x /usr/bin/cook ] || return 0 |
al@19765 | 28 |
pankso@9717 | 29 tmplog=$LOGS/$PACKAGE.tmplog |
al@19765 | 30 |
al@19765 | 31 cat > $tmplog <<EOT |
al@19765 | 32 Cook: $PACKAGE $VERSION |
al@19765 | 33 $(separator) |
al@19765 | 34 Cook toolchain : started $(date '+%F %R') |
pankso@10097 | 35 Architecture : $ARCH |
pankso@10097 | 36 Build system : $BUILD_SYSTEM |
pankso@10097 | 37 Host system : $HOST_SYSTEM |
al@19765 | 38 $(separator -) |
pankso@10035 | 39 EOT |
pankso@9717 | 40 |
al@19765 | 41 echo "cook: Binutils first pass : $(date '+%F %R')" >> $tmplog |
al@19765 | 42 cook binutils |
al@19765 | 43 echo "cook: GCC first pass : $(date '+%F %R')" >> $tmplog |
al@19765 | 44 cook gcc --first-pass |
al@19765 | 45 echo "cook: Linux API headers : $(date '+%F %R')" >> $tmplog |
al@19765 | 46 cook linux-api-headers |
al@19765 | 47 echo "cook: Glibc : $(date '+%F %R')" >> $tmplog |
al@19765 | 48 cook glibc |
al@19765 | 49 echo "cook: Binutils final : $(date '+%F %R')" >> $tmplog |
al@19765 | 50 cook binutils |
al@19765 | 51 echo "cook: GCC final : $(date '+%F %R')" >> $tmplog |
al@19765 | 52 cook gcc |
pankso@9717 | 53 |
al@19765 | 54 cat >> $tmplog <<EOT |
al@19765 | 55 $(separator) |
pankso@10097 | 56 |
al@19765 | 57 GCC compiler information |
al@19765 | 58 $(separator) |
al@19765 | 59 $(gcc -v 2>&1 | sed 's|--|\n --|g') |
al@19765 | 60 $(separator) |
pankso@9717 | 61 |
al@19765 | 62 EOT |
al@19765 | 63 |
al@19765 | 64 # All packages cooked got ther own log so we don't keep them. |
al@19561 | 65 mv -f $tmplog $LOGS/$PACKAGE.log |
pankso@16 | 66 |
al@19765 | 67 mkdir -p $install/usr/share/doc/slitaz |
al@19765 | 68 cat > $install/usr/share/doc/slitaz/toolchain.txt <<EOT |
pankso@9717 | 69 SliTaz GNU/Linux toolchain |
pankso@9717 | 70 ================================================================================ |
pankso@10036 | 71 |
al@19765 | 72 Build date : $(date "+%F") |
pankso@10097 | 73 Architecture : $ARCH |
pankso@10035 | 74 Build system : $BUILD_SYSTEM |
pankso@10035 | 75 Host system : $HOST_SYSTEM |
pankso@10035 | 76 |
pankso@9717 | 77 Packages: |
pankso@9717 | 78 |
al@19765 | 79 * Binutils $(ver binutils) |
al@19765 | 80 * Linux API headers $(ver linux-api-headers) |
al@19765 | 81 * GCC $(ver gcc) |
al@19765 | 82 * Glibc $(ver glibc) |
pankso@9717 | 83 |
pankso@10097 | 84 Toolchain documentation: http://doc.slitaz.org/en:cookbook:toolchain |
pankso@10036 | 85 |
pankso@9717 | 86 ================================================================================ |
pankso@9717 | 87 |
pankso@9717 | 88 EOT |
pankso@16 | 89 } |
al@19765 | 90 |
al@19765 | 91 # Rules to gen a SliTaz package suitable for Tazpkg. |
al@19765 | 92 genpkg_rules() |
al@19765 | 93 { |
al@19765 | 94 copy @std |
al@19765 | 95 DEPENDS="binutils linux-api-headers glibc-dev gcc make elfkickers" |
al@19765 | 96 } |