default_pre_build &&
cd $SOURCE_DIRECTORY &&

sedit  "s/-O2/$CFLAGS/"  Makefile                             &&
sedit  "s:DESTDIR=/usr/:DESTDIR=:"     Makefile               &&
sedit  "s:/share/:/usr/share/:"        Makefile               &&
sedit  "s:/usr:${INSTALL_ROOT}/usr:g"  Makefile               &&
sedit  "s:/etc:${INSTALL_ROOT}/etc:g"  Makefile               &&
sedit  's:$(DESTDIR)/lib/:$(LIBDIR):'  netem/Makefile         &&

# Fix document install directory
if  [  "$BUILD_DOCS"  =  y  ];  then
  sedit "s:PAGESPERPAGE=2:PAGESPERPAGE=2\nDOCDIR=${INSTALL_ROOT}/usr/share/doc/${SPELL}:" doc/Makefile
fi  &&

if  ! is_depends_enabled  ${SPELL}  db
then
  patch  -p1  <  ${SCRIPT_DIRECTORY}/no-arpd.diff
fi
