cookutils annotate cook.conf @ rev 1032

cook.conf: add some explanations; cook.site: do not force ${datadir} value; cooker: many receipts not include $HOST_ARCH definition, let them build on x86_64 host without obstacles.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Feb 22 15:44:11 2018 +0200 (2018-02-22)
parents 01fbe9d46cb4
children 0f7c6348363c
rev   line source
pankso@2 1 # Cook packages builder configuration file
pankso@2 2 #
pankso@2 3
pankso@2 4 # SliTaz working directory
pankso@314 5 SLITAZ="/home/slitaz"
pankso@2 6
pankso@185 7 # Directory paths for cookutils DB and files.
pankso@2 8 WOK="$SLITAZ/wok"
pankso@2 9 PKGS="$SLITAZ/packages"
pankso@2 10 SRC="$SLITAZ/src"
pankso@2 11 CACHE="$SLITAZ/cache"
pankso@2 12 LOGS="$SLITAZ/log"
pankso@310 13 FEEDS="$SLITAZ/xml"
pankso@2 14 DATA="/usr/share/cook"
pankso@2 15
pankso@185 16 # System packages DB.
pankso@2 17 DB="/var/lib/tazpkg"
pankso@2 18 INSTALLED="$DB/installed"
pankso@2 19
pascal@884 20 # Result of "ls $INSTALLED | md5sum | cut -c1-32"
pascal@884 21 SETUP_MD5=""
pascal@884 22
pankso@9 23 # Quality Assurance (empty to disable receipt_quality).
pankso@9 24 QA="0"
pankso@9 25
pankso@204 26 # Automatically cook missing build dependencies (empty to disable).
pankso@204 27 AUTO_COOK=""
pankso@204 28
pankso@2 29 # Hg wok for setup and flavors URL for the Cooker.
pankso@2 30 WOK_URL="http://hg.slitaz.org/wok"
pankso@2 31 FLAVORS_URL="http://hg.slitaz.org/flavors"
pankso@2 32
pankso@405 33 # Cooker URL for RSS feed link (http://localhost/cgi-bin/cooker/cooker.cgi)
pankso@310 34 COOKER_URL="http://cook.slitaz.org/"
pankso@310 35
pankso@2 36 # Translation files to be included in packages.
pankso@183 37 LOCALE=""
pankso@2 38
pankso@449 39 # List of packages installed in build chroot by cook or the Cooker setup.
pankso@449 40 SETUP_PKGS="slitaz-toolchain pkg-config intltool gettext zlib-dev bzip2
pascal@621 41 aufs-utils aufs m4 syslinux-extra pcre pcre-dev bash xorg-dev mercurial
pascal@622 42 rsync dropbear tazlito"
pankso@449 43
paul@197 44 # Target host architecture type (Glibc doesn't support i386 anymore).
pankso@183 45 ARCH="i486"
pankso@2 46
pankso@184 47 # Build and host. These options are for cross-compiling. If you specify
pankso@184 48 # both options and BUILD_SYSTEM is different from HOST_SYSTEM, configure
pankso@184 49 # will prepare to cross-compile from BUILD_SYSTEM to be used on HOST_SYSTEM.
pankso@216 50 #BUILD_SYSTEM="$(uname -m)-slitaz-linux"
pankso@216 51 BUILD_SYSTEM="$ARCH-slitaz-linux"
pankso@185 52 HOST_SYSTEM="$ARCH-slitaz-linux"
pankso@2 53
paul@455 54 # SliTaz uses the sysroot method, this tells GCC to consider dir as the root
pankso@441 55 # of a tree that contains a (subset of) the root filesystem of the target
pankso@441 56 # operating system. Target system headers, libraries and run-time object
pankso@441 57 # files will be searched in there. Cook will use the tools and sysroot in
pankso@441 58 # the CROSS_TREE for cross compiling. Example: CROSS_TREE="/cross/$ARCH"
pankso@441 59 CROSS_TREE=""
pankso@192 60
pankso@449 61 # List of packages installed in chroot by cook or the Cooker setup.
pankso@449 62 # When cross compiling we need some build system tools installed and
pankso@449 63 # some cross-compiled bdeps installed in: $PREFIX (cross host root)
pankso@449 64 CROSS_SETUP="slitaz-toolchain zlib-dev bzip2 aufs-utils aufs bash m4 \
pankso@646 65 autoconf automake libtool gettext bison texinfo"
pankso@449 66
pankso@184 67 # SliTaz optimisation flags - Wide compatibility & optimized for ARCH.
pankso@369 68 #
pankso@183 69 # With -O2: binutils: Produce 14.0M Packed 5.5M Compressed 1.2M
pankso@183 70 # With -Os: binutils: Produce 13.4M Packed 4.9M Compressed 1.1M
pankso@369 71 #
al@1028 72 # ARM: don't use -Os but -O2
pankso@369 73 # ARM: -mcpu=name [arm9|xscale|...] or -march=name [armv4|armv6|...]
pankso@441 74 # x86_64: CFLAGS="-march=nocona -Os -pipe"
pankso@369 75 #
pankso@373 76 #MAKEFLAGS="-j$(($(grep processor /proc/cpuinfo | wc -l)+1))"
pankso@373 77 MAKEFLAGS="-j$(grep processor /proc/cpuinfo | wc -l)"
al@1032 78
al@1032 79 # Note '-mindirect-branch=thunk' and friends appeared since GCC-7.3 and
al@1032 80 # an earlier versions will produce comple errors.
al@1032 81 # We use this flag against some flavors of the Spectre vulnerability.
al@1032 82 # FIXME: it looks like the flag '-mindirect-branch=thunk-extern' recommended,
al@1032 83 # but no one app is compiled using it even using GCC-7.3. Is something wrong?
al@1028 84 case "$ARCH" in
al@1032 85 i?86) CFLAGS="-march=$ARCH -Os -pipe -mindirect-branch=thunk";;
al@1032 86 x86_64) CFLAGS="-march=nocona -Os -pipe -mindirect-branch=thunk";;
al@1028 87 arm*) CFLAGS="-march=armv6 -O2";; # FIXME
al@1028 88 esac
pankso@2 89 CXXFLAGS="$CFLAGS"
pankso@2 90
paul@382 91 # Binutils 2.22 breaks many packages built without LDFLAGS set correctly.
pankso@358 92 #LDFLAGS="-Wl,--copy-dt-needed-entries -lXt"
pankso@358 93
pankso@184 94 # Default tool prefix for Binutils.
pankso@184 95 TOOLPREFIX="${HOST_SYSTEM}-"
pankso@2 96
paul@197 97 # Default arguments for GNU configure. CONFIGURE_ARGS is needed for some
pankso@184 98 # packages since --build and --host is not set at all by cook.site (bug ?).
pankso@2 99 CONFIG_SITE=/etc/slitaz/cook.site
pankso@184 100 CONFIGURE_ARGS="--build=$BUILD_SYSTEM --host=$HOST_SYSTEM"
pankso@2 101
pankso@2 102 # Mirrors URLs. To download sources near your location.
psychomaniak@740 103 GNU_MIRROR="http://mirror.switch.ch/ftp/mirror/gnu"
al@871 104 SF_MIRROR="https://downloads.sourceforge.net"
al@871 105 XORG_MIRROR="https://www.x.org/archive/individual"
pankso@2 106 GNOME_MIRROR="http://ftp.gnome.org/pub/GNOME/sources"
al@871 107 GITHUB="https://api.github.com/repos"
pankso@29 108
pankso@358 109 # List of filesystems into the aufs chroot (to protect / against modifications)
pascal@293 110 # Default tank config:
pankso@369 111 AUFS_MOUNTS="/ /proc /sys /dev/shm /dev/pts /var/cache/tazpkg \
pankso@369 112 /home /home/slitaz/src /home/slitaz/packages"
pankso@405 113
pankso@405 114 # Old way/tazwok compatibility.
pankso@405 115 BUILD_HOST="$HOST_SYSTEM"
pankso@421 116 SOURCES_REPOSITORY=$SRC
pascal@580 117
pascal@580 118 # Maximum log size in MB per receipt function call (unset it to disable)
pascal@580 119 DEFAULT_LOG_LIMIT=50