tazwok annotate examples/config.site @ rev 460

tazwok: various fixes about packages_db() generation
author Antoine Bodin <gokhlayeh@slitaz.org>
date Fri Mar 25 17:58:40 2011 +0100 (2011-03-25)
parents 919becf8fe71
children cdab17eb0dc9 44e24b12e9dd
rev   line source
paul@429 1 # This file contains default options passed to ./configure at compile time.
paul@429 2 # Variables are set this way :
gokhlayeh@186 3 # { [ "$var" = NONE ] || [ ! "$var" ] ; } && var=
paul@429 4 # This is because config.site overwrites options passed directly in
gokhlayeh@186 5 # configure, like ./configure --var=
gokhlayeh@186 6 #
paul@429 7 # Here, we don't want to overwrite the default configuration : we want to
paul@429 8 # setup configure with a default path only if nothing has been given
gokhlayeh@186 9 # on the configure command-line. This allow contributors to overwrite
paul@429 10 # the default paths filled here by the recipes.
gokhlayeh@186 11 #
paul@429 12 # Path to the config.site is given to configure using the environment
gokhlayeh@186 13 # variable CONFIG_SITE
gokhlayeh@186 14 # tazwok does that work before executing compile rules.
gokhlayeh@186 15 #
paul@429 16 # If you want to use your own config.site, you can use :
gokhlayeh@186 17 # export CONFIG_SITE=path_to_my_config.site
gokhlayeh@186 18 # in the compilation_rules of a receipt.
paul@429 19 # It can be useful if you want to share a default configuration between
gokhlayeh@186 20 # some groups of packages like GNOME or KDE ones.
gokhlayeh@186 21 #
paul@429 22 # To make tazwok configuration easier, we use variables from
paul@429 23 # /etc/tazwok.conf here. Note this only concerns configure options :
gokhlayeh@186 24 # make flags (MAKEFLAGS, CFLAGS, CXXFLAGS and DESTDIR) are exported
paul@429 25 # to environment variables; options set here are those we can't
paul@429 26 # export environnment variables to because they don't work.
gokhlayeh@186 27
gokhlayeh@186 28 # Some variable are prefixed by "${prefix}" instead of "${datarootdir}".
paul@429 29 # For those cases we use "${datadir}" because the configure script
paul@429 30 # generally doesn't know about "${datarootdir}" (too old).
gokhlayeh@186 31 if echo "$localedir" | grep -q \${prefix}; then
gokhlayeh@186 32 localedir=$( echo "$localedir" | sed 's/${prefix}/${datarootdir}/')
gokhlayeh@186 33 fi
gokhlayeh@186 34 if echo "$infodir" | grep -q \${prefix}; then
gokhlayeh@186 35 infodir=$( echo "$infodir" | sed 's/${prefix}/${datarootdir}/')
gokhlayeh@186 36 fi
gokhlayeh@186 37 if echo "$mandir" | grep -q \${prefix}; then
gokhlayeh@186 38 mandir=$( echo "$mandir" | sed 's/${prefix}/${datarootdir}/')
gokhlayeh@186 39 fi
gokhlayeh@186 40
paul@429 41 # Use default values if one of these configure variables is not set.
gokhlayeh@186 42 { [ "$prefix" = NONE ] || [ ! "$prefix" ] ; } && prefix=$default_prefix
gokhlayeh@186 43 { [ "$datarootdir" = NONE ] || [ ! "$datarootdir" ] ; } && datarootdir=$default_datarootdir
gokhlayeh@186 44 { [ "$datadir" = NONE ] || [ ! "$datadir" ] ; } && datadir=$datarootdir
gokhlayeh@186 45 { [ "$localedir" = NONE ] || [ ! "$localedir" ] ; } && localedir=$default_localedir
gokhlayeh@186 46 { [ "$infodir" = NONE ] || [ ! "$infodir" ] ; } && infodir=$default_infodir
gokhlayeh@186 47 { [ "$mandir" = NONE ] || [ ! "$mandir" ] ; } && mandir=$default_mandir
gokhlayeh@186 48 { [ "$build" = NONE ] || [ ! "$build" ] ; } && build=$default_build
gokhlayeh@186 49 { [ "$host" = NONE ] || [ ! "$host" ] ; } && host=$default_host
gokhlayeh@186 50
paul@429 51 # Print information about these variables.
gokhlayeh@186 52 echo "prefix = $prefix
gokhlayeh@186 53 datarootdir = $datarootdir
gokhlayeh@186 54 datadir = $datadir
gokhlayeh@186 55 localedir= $localedir
gokhlayeh@186 56 infodir = $infodir
gokhlayeh@186 57 mandir = $mandir
gokhlayeh@186 58 build = $build
gokhlayeh@186 59 host = $host
gokhlayeh@186 60 "
gokhlayeh@186 61
paul@429 62 # config.site is used by tazwok to check that the config.site script has been used.
gokhlayeh@186 63 touch /tmp/config.site