
#
# generated by mkskel 0.0.2r28
#

VERSION="0.3.2.2"
ARCH="i386"
RELEASE="1"

# --------- |-----handy-ruler------------------------------------------------------|
DESCRIPTION="w3m is a pager with WWW capability\n
             \n
             When reading HTML document, you can follow links and view images\n
              (using external image viewer).\n
             It has 'internet message mode', which determines the type of document\n
              from header. If the Content-Type: field of the document is text/html,\n
              that document is displayed as HTML document.\n
             You can change URL description like 'http://hogege.net' in plain text\n
              into link to that URL."
# --------- |-----handy-ruler------------------------------------------------------|

PREFIX="/usr"
SYSCONFDIR="/etc"

SOURCE_DIRECTORY="w3m-$VERSION"

PACKAGE_NAME="w3m-${VERSION}-${ARCH}-${RELEASE}"

INSTALL_MODE="jail"

DOWNLOAD () { return 0; }

EXTRACT ()
{
  do_extract "w3m-$VERSION.tar.gz"
}

CONFIGURE ()
{
  ./configure -prefix=${PREFIX} \
              -bindir=${PREFIX}/bin \
              -libdir=${PREFIX}/lib/w3m \
              -helpdir=${PREFIX}/share/w3m \
              -sysconfdir=${SYSCONFDIR}/w3m \
              -lang=en \
              -model=monster \
              -yes
}

BUILD ()
{
  make
}

POST_BUILD ()
{
  cat < /dev/null > ./gc/depcomp
}

INSTALL ()
{
  make -e DESTDIR=${DESTDIR} install
}

POST_INSTALL ()
{
  mkdir -p ${DESTDIR}${SYSCONFDIR}/w3m
  cd ./doc
  
  for i in keymap.default \
           keymap.lynx \
           menu.default \
           menu.submenu ; do
    install -m 644 -o root -g root ./$i ${DESTDIR}${SYSCONFDIR}/w3m
  done
  ( cd ${DESTDIR}${SYSCONFDIR}/w3m && ln -s keymap.default keymap )
  ( cd ${DESTDIR}${SYSCONFDIR}/w3m && ln -s menu.submenu menu )
  
  mkdir -p ${DESTDIR}${PREFIX}/man/man1
  install -m 644 -o root -g root ./w3m.1 ${DESTDIR}${PREFIX}/man/man1
  
  cd ..
}
