tazwok diff examples/config.site @ rev 426

Added support for bazaar VCS packages.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Mar 06 20:53:19 2011 +0000 (2011-03-06)
parents
children ff2492afbf1a
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/config.site	Sun Mar 06 20:53:19 2011 +0000
     1.3 @@ -0,0 +1,63 @@
     1.4 +# This file contains default option passed to ./configure at compile time.
     1.5 +# Variables are setted this way :
     1.6 +# { [ "$var" = NONE ] || [ ! "$var" ] ; } && var=
     1.7 +# This is because config.site overwrite options passed directly in
     1.8 +# configure, like ./configure --var=
     1.9 +#
    1.10 +# Here, we don't want overwrite default configuration : we want to
    1.11 +# setup configure with default path only if nothing has been given
    1.12 +# on the configure command-line. This allow contributors to overwrite
    1.13 +# the defaults path filled here in the recipes.
    1.14 +#
    1.15 +# Path to the config.site is given to configure using the environnment
    1.16 +# variable CONFIG_SITE
    1.17 +# tazwok does that work before executing compile rules.
    1.18 +#
    1.19 +# If you want to use you're own config.site, you can use :
    1.20 +# export CONFIG_SITE=path_to_my_config.site
    1.21 +# in the compilation_rules of a receipt.
    1.22 +# It can be usefull if you want to share default configuration between
    1.23 +# some groups of packages like GNOME or KDE ones.
    1.24 +#
    1.25 +# To make tazwok configuration easier, we use variable from
    1.26 +# /etc/tazwok.conf here. Note that only concerns configure options :
    1.27 +# make flags (MAKEFLAGS, CFLAGS, CXXFLAGS and DESTDIR) are exported
    1.28 +# to environment variables; options setted here are thoses we can't
    1.29 +# export in environnment variables because it doesn't works.
    1.30 +
    1.31 +# Some variable are prefixed by "${prefix}" instead of "${datarootdir}".
    1.32 +# For thoses case we use "${datadir}" because there's configure script
    1.33 +# generally don't know about "${datarootdir}" (too olds). 
    1.34 +if echo "$localedir" | grep -q \${prefix}; then
    1.35 +	localedir=$( echo "$localedir" | sed 's/${prefix}/${datarootdir}/')
    1.36 +fi
    1.37 +if echo "$infodir" | grep -q \${prefix}; then
    1.38 +	infodir=$( echo "$infodir" | sed 's/${prefix}/${datarootdir}/')
    1.39 +fi
    1.40 +if echo "$mandir" | grep -q \${prefix}; then
    1.41 +	mandir=$( echo "$mandir" | sed 's/${prefix}/${datarootdir}/')
    1.42 +fi
    1.43 +
    1.44 +# Use default values if one of theses configure variable is not set.
    1.45 +{ [ "$prefix" = NONE ] || [ ! "$prefix" ] ; } && prefix=$default_prefix
    1.46 +{ [ "$datarootdir" = NONE ] || [ ! "$datarootdir" ] ; } && datarootdir=$default_datarootdir
    1.47 +{ [ "$datadir" = NONE ] || [ ! "$datadir" ] ; } && datadir=$datarootdir
    1.48 +{ [ "$localedir" = NONE ] || [ ! "$localedir" ] ; } && localedir=$default_localedir
    1.49 +{ [ "$infodir" = NONE ] || [ ! "$infodir" ] ; } && infodir=$default_infodir
    1.50 +{ [ "$mandir" = NONE ] || [ ! "$mandir" ] ; } && mandir=$default_mandir
    1.51 +{ [ "$build" = NONE ] || [ ! "$build" ] ; } && build=$default_build
    1.52 +{ [ "$host" = NONE ] || [ ! "$host" ] ; } && host=$default_host
    1.53 +
    1.54 +# Print information about theses variables.
    1.55 +echo "prefix = $prefix
    1.56 +datarootdir = $datarootdir
    1.57 +datadir = $datadir
    1.58 +localedir= $localedir
    1.59 +infodir = $infodir
    1.60 +mandir = $mandir
    1.61 +build = $build
    1.62 +host = $host
    1.63 +"
    1.64 +
    1.65 +# config.site is used by tazwok to check that config.site script has been used.
    1.66 +touch /tmp/config.site