default_pre_build                                                    &&
cd  ${SOURCE_DIRECTORY}                                              &&

S_KERNELRELEASE=get_kernel_version                                   &&
export S_KERNELRELEASE                                               &&

if [[ $(get_kernel_version) == 2.6.15* ]];  then
   patch -p2 < ${SCRIPT_DIRECTORY}/svgalib_helper-2.6.15.diff
fi                                                                   &&

# Some other fixes I needed to do
sedit  's:<config.h>:\"config.h\":'            threeDKit/3dinit.c    &&
sedit  's:<config.h>:\"config.h\":'            threeDKit/3dkit.c     &&
sedit  's:<config.h>:\"config.h\":'            threeDKit/triangl.c   &&
sedit  's:<config.h>:\"config.h\":'            threeDKit/wrapsurf.c  &&

# Put the man pages in their proper location.
sedit  's:$(prefix)/man:$(prefix)/share/man:'  Makefile.cfg          &&

# Disable kernel module support while building stages
sedit  's:installmodule ::'                    Makefile
