#!/bin/sh
# $FreeBSD: ports/www/openbravoerp/pkg-install,v 1.1 2009/01/14 12:48:36 miwi Exp $

PATH=/bin:/usr/bin:/usr/sbin

dbwarning() { echo "

  ===============================================
  Openbravo ERP requires a superuser \"postgres\",
  please issue following command to create it:

  # createuser -s -W postgres

  This is not done by the port. And use
  \"/usr/local/tomcat5.5\" as the Tomcat
  directory when you are prompted to enter
  the location.
  
  Press Ctrl-C now if you need to create it.
  ===============================================
"
        sleep 5
}

case $2 in
PRE-INSTALL)
        dbwarning
	;;

POST-INSTALL)
        if [ -f ${PKG_PREFIX}/OpenbravoERP2.40/uninstaller_standard ]; then
          rm -f ${PKG_PREFIX}/OpenbravoERP2.40/uninstaller_standard
        fi
        ;;

DBWARNING)
        dbwarning
        ;;
esac

