##
## Setup file for various definitions
##
architecture	:= $(shell dpkg-architecture -qDEB_HOST_ARCH)
debianversion	:= 3.0
debname		:= woody
arches		:= alpha arm i386 m68k powerpc sparc ia64 hppa mips mipsel s390

##
## Kernel
##
# kver      = main kernel for bootdisks
ifeq "$(architecture)" "alpha"
    kver	:= 2.2.20
endif
ifeq "$(architecture)" "arm"
    kver_netwinder := 2.2.19
    kver_riscpc	:= 2.2.19
    kver_lart	:= 2.4.16
    kver_shark	:= 2.4.16
endif
ifeq "$(architecture)" "i386"
    kver	:= 2.2.20
    kver_24     := 2.4.18
endif
ifeq "$(architecture)" "m68k"
    kver	:= 2.2.20
endif
ifeq "$(architecture)" "powerpc"
    kver	:= 2.2.20
    pcmcia_kver := 2.2.20-pmac
    apuskver	:= 2.2.10
    # NewWorld powermacs really need a 2.4 kernel
    kver_newpmac := 2.4.18
endif
ifeq "$(architecture)" "sparc"
    kver	:= 2.2.20
    kver_sun4u	:= 2.4.18
endif
ifeq "$(architecture)" "ia64"
    kver	:= 2.4.17
endif
ifeq "$(architecture)" "hppa"
    kver	:= 2.4.17
endif
ifeq "$(architecture)" "mips"
    kver        := 2.4.16
endif
ifeq "$(architecture)" "mipsel"
    kver        := 2.4.17
endif
ifeq "$(architecture)" "s390"
    kver	:= 2.4.17
endif

##
## if you're building complete documentation using
## content-negotiation, for instance, as in how it's build for
## www.debian.org/releases/..., then set this.
##
OFFICIALWEBBUILD := false


##
## once you've downloaded the materials, you can set this to true
##
offline_mode := false


## 
## file locations
##

# Top-level directory where we will look for external stuff required
# to build the boot-floppies.  It has to be an absolute PATH or else
# the basedisks.sh script will fail.
ftp_archive	:= /archive/debian

# files from Incoming; note they must be named *_all.deb or *_<arch>.deb
incoming	:= $(ftp_archive)/Incoming

# if you want another place to look for updates, i.e., local packages;
# these files are just *.deb
export local_dir	:= $(ftp_archive)/local

# tools, such as rawrite2 (i386 only)
tools_dir	:= $(ftp_archive)/tools

# where required .debs are downloaded
## FIXME: is the export really helping here
export archive 	:= $(ftp_archive)/download

##
## Debian mirror we can download from, must be http://, ftp:// or file://
##
export MIRRORS	:= http://samosa-replacement.debian.org/debian

##
## How to achieve root
##   building boot-floppies often requires root access
##
ROOTCMD		:= $(shell [ `id -u` = 0 ] || echo sudo)

##
## Internationalization
##

# whether to use the language chooser in dbootstrap for kernel flavours that
# support it, `true' or `false'
ifneq (,$(filter $(architecture),i386 arm powerpc ia64 m68k hppa))
    export USE_LANGUAGE_CHOOSER := true
    export LC := true
else
    export USE_LANGUAGE_CHOOSER := false
    export LC := false
endif

# list of all available languages
# each language listed here must be buildable in documentation and have
# and entry in scripts/rootdisk/messages/languages)
langs		:= C ca cs da de eo es fi fr gl hr hu it ja ko pl pt ru sk sv tr zh_TW

# langs we want to include on an internationalized root disk; 'en' is req'd
# I use http://counter.li.org/reports/short.php?orderby=users#table
# for popularity data; sk eliminated as it's too stale
ifeq ($(architecture),alpha)
    export langs_root := en de pt ja
else
    ifneq (,$(filter $(architecture),arm ia64 hppa))
	export langs_root	:= en ca cs da de eo es fi fr gl hr hu it ja ko pl pt ru sk sv tr zh_TW
    else
    ifeq ($(architecture),powerpc)
        export langs_root	:= en pt de pl fr es ja sv
    else
    ifeq ($(architecture),m68k)
        export langs_root	:= en pt de pl fr es ja sv
    else
    ifeq ($(architecture),i386)
        export langs_root := en pt de fr ja es
    else
        export langs_root	:= en pt de pl fr es ja sv
    endif
    endif
    endif
    endif
endif

# this is for 1200 floppies only
export langs_root_few := en

# default language
LINGUA		:= C
export LINGUA

ifeq ($(USE_LANGUAGE_CHOOSER),true)
ifneq ($(LINGUA),C)
LC-lossage:
	@echo 
	@echo Since you are about to use language chooser you must set LINGUA variable to C
	@echo 
	@exit 1
endif
endif

# languages that use Latin-1 charset with accentuation, tilde, etc
LATIN1		:= ca de es fr gl pt it
# languages that use Latin-2 charset
LATIN2		:= cs hr hu pl sk
# languages that use Latin-3 charset
LATIN3		:= eo
# languages that use Latin-5 charset
LATIN5		:= tr 
# languages that use KOI8-R charset
KOI8-R		:= ru
# what about: fi ja ko ?  do they need to have charsets?

# Set the KBD variable if you want that installation question to be skipped.
# Use KBD := qwerty/us for US English keyboard, azerty/fr-latin0 (fr_FR with
# Euro), qwertz/de-latin1-nodeadkeys for de_DE, qwerty/es for es_ES, etc...  see
# utilities/dbootstrap/kbdconfig.[ch] for the complete list of available
# keyboards.
#KBD		:= qwerty/us

##
## alpha-specific configuration (other archs can ignore this)
##

# Where to put downloaded stuff?
alpha_tools_dir	:= $(archive)/alpha-tools

alpha_apb_dir   := $(alpha_tools_dir)/apb
alpha_milo_dir  := $(alpha_tools_dir)/milo

# set this to NO if you don't want to build MILO disk images
build_milo_disks         := YES

# MILO
# The milo binaries will be downloaded into alpha_milo_dir
# You will also need the MILO utility 'srmbootfat'. Grab the source at
# http://www.suse.de/~stepan/source/milo-$milo_version.tar.bz2, unpack
# it, enter tools/boot, type make and put srmbootfat somewhere in your
# path.
# 2.2-18 is available, but not as tested
milo_version    := 2.2-17
milo_url	:= http://www.suse.de/~stepan/binaries/$(milo_version)
# ugly kludge for non-working pc164, ruffian and xlt
milo_url2	:= http://people.debian.org/~falk/milo

# linload.exe, needed to load milo from ARC or AlphaBios firmware
alpha_linload_url:=ftp://ftp.debian.org/debian/dists/potato/main/disks-alpha/current/MILO/linload.exe
# ldmilo.exe, the equivalent for Ruffians.  This version is hacked by
# Ron Farrer, see
# http://people.debian.org/~rbf/files/ruffian/README.TXT
alpha_ldmilo_url:=http://people.debian.org/~rbf/files/ruffian/ldmilo-patched-20010430

# APB and PALCode. We will extract apb.exe, up1000.pal, install.txt, README.txt
# NOTE: ABP stuff is currently broken.
alpha_apb_url := http://www.alpha-processor.com/products/downloads/customer_support/UP1000/up1000-abios-install.tar.gz

# Set to YES to build network-bootable image.
alpha_build_bootp := YES

### end alpha-specific configuration

# Empty string for no, anything else for yes.
CLEAN_RELEASE_DIR_AFTER_TAR =

# export MAINTAINER="1name 2name <XXXX@debian.org>"

# For debuging set these defines
#
#TESTLANG=de
#KVER=2.2.9
#CFLAGS += -DLOG
#CFLAGS += -DTEST

# Local Variables:
# mode: makefile
# End:
