# Cook packages builder configuration file
#

# SliTaz working directory
SLITAZ="/home/slitaz"

# Directory paths for cookutils DB and files.
WOK="$SLITAZ/wok"
PKGS="$SLITAZ/packages"
SRC="$SLITAZ/src"
CACHE="$SLITAZ/cache"
LOGS="$SLITAZ/log"
FEEDS="$SLITAZ/xml"
DATA="/usr/share/cook"

# System packages DB.
DB="/var/lib/tazpkg"
INSTALLED="$DB/installed"

# Quality Assurance (empty to disable receipt_quality).
QA="0"

# Automatically cook missing build dependencies (empty to disable).
AUTO_COOK=""

# Hg wok for setup and flavors URL for the Cooker.
WOK_URL="http://hg.slitaz.org/wok"
FLAVORS_URL="http://hg.slitaz.org/flavors"

# Cooker URL for RSS feed link (http://localhost/cgi-bin/cooker/cooker.cgi)
COOKER_URL="http://cook.slitaz.org/"

# Translation files to be included in packages.
LOCALE=""

# Target host architecture type (Glibc doesn't support i386 anymore).
ARCH="i486"

# Build and host. These options are for cross-compiling. If you specify
# both options and BUILD_SYSTEM is different from HOST_SYSTEM, configure
# will prepare to cross-compile from BUILD_SYSTEM to be used on HOST_SYSTEM.
#BUILD_SYSTEM="$(uname -m)-slitaz-linux"
BUILD_SYSTEM="$ARCH-slitaz-linux"
HOST_SYSTEM="$ARCH-slitaz-linux"

# Cross compilation settings. Prefix is use by cook to export PATH so it
# can use the cross-tools in $CROSS_PREFIX/bin.
CROSS_PREFIX=/usr/cross/$ARCH

# Sysroot is used by cross-tools to set the system. SliTaz standard is
# to point sysroot to the directory of the cross toolchain. The default
# is to use cross with: --prefix=/usr/cross/$ARCH and no --with-sysroot=
# Example: SYSROOT="/usr/$HOST_SYSTEM"
SYSROOT=""

# SliTaz optimisation flags - Wide compatibility & optimized for ARCH.
#
# With -O2: binutils: Produce 14.0M Packed 5.5M Compressed 1.2M
# With -Os: binutils: Produce 13.4M Packed 4.9M Compressed 1.1M
#
# ARM:  don't use -0s but -02
# ARM: -mcpu=name [arm9|xscale|...] or -march=name [armv4|armv6|...]
#
#MAKEFLAGS="-j$(($(grep processor /proc/cpuinfo | wc -l)+1))"
MAKEFLAGS="-j$(grep processor /proc/cpuinfo | wc -l)"
CFLAGS="-march=$ARCH -Os -pipe -fomit-frame-pointer"
CXXFLAGS="$CFLAGS"

# Binutils 2.22 breaks many packages built without LDFLAGS set correctly.
#LDFLAGS="-Wl,--copy-dt-needed-entries -lXt"

# Default tool prefix for Binutils.
TOOLPREFIX="${HOST_SYSTEM}-"

# Default arguments for GNU configure. CONFIGURE_ARGS is needed for some
# packages since --build and --host is not set at all by cook.site (bug ?).
CONFIG_SITE=/etc/slitaz/cook.site
CONFIGURE_ARGS="--build=$BUILD_SYSTEM --host=$HOST_SYSTEM"

# Mirrors URLs. To download sources near your location.
GNU_MIRROR="ftp://sunsite.cnlab-switch.ch/mirror/gnu"
SF_MIRROR="http://switch.dl.sourceforge.net/sourceforge"
XORG_MIRROR="ftp://ftp.solnet.ch/mirror/x.org/pub/individual"
GNOME_MIRROR="http://ftp.gnome.org/pub/GNOME/sources"

# List of packages installed by cook or the Cooker setup.
SETUP_PKGS="slitaz-toolchain pkg-config intltool gettext zlib-dev bzip2
aufs-utils aufs m4 syslinux-extra pcre pcre-dev bash xorg-dev"

# List of filesystems into the aufs chroot (to protect / against modifications)
# Default tank config:
AUFS_MOUNTS="/ /proc /sys /dev/shm /dev/pts /var/cache/tazpkg \
/home /home/slitaz/src /home/slitaz/packages"

# Old way/tazwok compatibility.
BUILD_HOST="$HOST_SYSTEM"
SOURCES_REPOSITORY=$SRC
