# $Progeny: options,v 1.40 2002/04/15 16:58:02 branden Exp $

# This file contains variables that need to be set for your build of the
# Debian release

# username; used mostly just for temporary directory naming
: ${USERID:=$(whoami)}
export USERID

# builder; used to identify the person who built the installer in its internal
# documentation
for ID in "$DEBEMAIL" "$EMAIL" "$USERID"; do
    if [ -n "$ID" ]; then
        FALLBACK_BUILDER="$ID"
        break
    fi
done

: ${BUILDER:=$FALLBACK_BUILDER}
export BUILDER

# path to use while building ISOs
PATH=${PGI_PATH:-/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin}
export PATH

# NOTE: Tune these parameters to meet the needs of your local setup.

# where PGI finds its own infrastructure
: ${PGI_DIR:=/usr/share/pgi}
export PGI_DIR

# customizable files keyed to each release
ETC_DIR=/etc/pgi/$CODENAME
export ETC_DIR

# the base temporary directory from which others are created (by default)
: ${BASETMPDIR:=${TMPDIR:-.}/pgi-$USERID}

# where to stuff miscellaneous temporary files
# Loopback mounts are placed here, among other things.
: ${TDIR:=$BASETMPDIR/misc}
export TDIR

# where to dump the ISO images
: ${OUT:=$BASETMPDIR/out}
export OUT

# boolean indicating whether to clean the temporary directories by default
: ${CLEAN:=0}
export CLEAN

# boolean indicating whether to clean the temporary directories after the build
# is finished; overrides the behavior of CLEAN when the build process is
# complete
: ${POST_CLEAN:=0}
export POST_CLEAN

# kernel to use for boot floppies and initrd creation
: ${KERNEL_VERSION:=$(uname -r)}
export KERNEL_VERSION

# whether to create a CD image that contains only the installer
# if set to a non-zero value, see the archive options below
: ${INSTALLER_ONLY:=0}
if [ $INSTALLER_ONLY -eq 1 ]; then
    export INSTALLER_ONLY
fi

# whether to use the system's debootstrap or not; if not, PGI's own forked
# version is used
: ${DEBIAN_DEBOOTSTRAP:=0}
if [ $DEBIAN_DEBOOTSTRAP -ne 0 ]; then
    export DEBIAN_DEBOOTSTRAP
fi

# name of PGI vendor
: ${VENDOR:=Debian}
export VENDOR

# name of PGI-based product by vendor
: ${PRODUCT:=GNU/Linux}
export PRODUCT

# name of distribution suite; e.g., for Debian, "potato", "woody", "sarge", etc.
: ${SUITE:=woody}
export SUITE

# OS release version
: ${VERSION:=3.0}
export VERSION

# string designating release's official status
: ${OFFICIAL:=Unofficial}
export OFFICIAL

# the installer uses this as a reference to the Debian package archive
: ${PGI_MIRROR:=http://archive.progeny.com/debian}
export PGI_MIRROR

# the installer uses this as an HTTP proxy server
: ${PGI_HTTP_PROXY:=}
export PGI_HTTP_PROXY

# loopback mounts (typically) require root privileges
: ${SU_CMD:=sudo}
export SU_CMD

# arguments to pass to syslinux (only used on i386)
# The example below passes the "safe, slow, and stupid" option to syslinux, but
# in our experience the "slow" is only too accurate, even on CD-ROM devices and
# despite the syslinux author's assertions to the contrary in the syslinux
# manual page.  Therefore, it is commented out by default.  You will want to
# uncomment this if your target systems have lobotomized optical drives.
# : ${SYSLINUX_OPTIONS:=-s}
export SYSLINUX_OPTIONS

# (internal use) sets environment variable RELEASE_dirname=/path/to/dir
#   This can then be used to navigate around... it's hackish, but it's needed
#   to do some stuff with the woody.hook script in cdrom/tools
#   XXX: these needs to go away or be generalized properly
for DIR in live minimal tools; do
    if [ -d /usr/share/pgi/$DIR ] ; then
        eval RELEASE_$DIR=/usr/share/pgi/$DIR
        eval export RELEASE_$DIR
    fi
done

###############################################################################
# variables controlling behavior of the package archive generation code

# CD build process uses this to locate mirror of Debian archive
: ${PGI_BUILD_MIRROR:=/archive}
export PGI_BUILD_MIRROR

# locations of additional package repositories to place in ISO image(s)
# It is assumed that this directory has a Packages.gz file directly inside.
# NOTE: This variable is presently unused.
: ${OTHER_ARCHIVES:=}
export OTHER_ARCHIVES

# whether to create archives of source packages
: ${INCLUDE_SOURCE_PACKAGES:=1}
export INCLUDE_SOURCE_PACKAGES

###############################################################################
# variables used only by debian-cd code

# This section replaces the use of debian-cd's CONF.sh, see there for
# documentation.

# where to put retrieved package files
APTTMP=$TDIR/apt
export APTTMP

# boolean indicating whether to include all packages in the archive, or just
# those included in the "tasks"
: ${COMPLETE:=0}
export COMPLETE

# boolean indicating whether to include non-free software in the ISO image(s)
: ${NONFREE:=0}
export NONFREE

: ${DEBVERSION:=$VERSION}
export DEBVERSION

: ${BASEDIR:=/usr/share/pgi/archive/debian-cd}
export BASEDIR

: ${COPYLINK:=1}
export COPYLINK

: ${VERBOSE_MAKE:=1}
export VERBOSE_MAKE

###############################################################################

: ${ARCH:=$(dpkg --print-installation-architecture)}
export ARCH

# flag indicating that this script has run to completion
export OPTIONS_FILE_SOURCED=true

###############################################################################
# These guys are private, but shared variables.  We really need a separate,
# non-configurable file for them but they can go here for now.

BUSYBOX=busybox-0.60.0
export BUSYBOX

if [ -e /lib/modules/$KERNEL_VERSION/pcmcia ]; then
    DO_PCMCIA_ARCHIVE=1
    export DO_PCMCIA_ARCHIVE
fi

# filesystem type to use for initrd (must be a writable filesystem type; i.e.,
# not cramfs)
INITRD_FS=ext2

# size of initrd filesystem, in kB
INITRD_FS_SIZE=8192

export INITRD_FS INITRD_FS_SIZE

# Local variables:
# mode: sh
# End:
# vim:ai:et:sts=4:sw=4:tw=80:
