#!/bin/sh

VERSION=`sh ../../batch/getversion.sh`

(rm -rf /tmp/white_dune && \
 cd ../../.. && mkdir /tmp/opt \
 cp -r white_dune-$VERSION /tmp/opt/white_dune && \
 cd /tmp/opt/white_dune && \
 make realclean && \
 ./configure \
  --with-helpurl="/opt/white_dune/docs/" \
  --with-protobaseurl="/opt/white_dune/docs" \
 && make) && 
 cat > /tmp/white_dune.psf << EOT
#&##
#&## PSF generated by SPB 
#&##
    description "white_dune"
    copyright "
              Copyright (C) 1999 Stephen F. White (GPL) 
              GNU GENERAL PUBLIC LICENSE Version 2, June 1991 
              See file COPYING for more information" "
    number $VERSION
product
    tag white_dune
    description "
white_dune is:
- a graphical editor to load/create/store X3D/VRML97 files
- a simple NURBS/Superformula based 3D modeller
- a 3D animation tool
- a commandline X3D/VRML97 compiler in development
- a program with (currently) 3 different GUIs
- a program for beginners/children to create their first 3D animation (-4kids)
- a tool (and examples) that supports you in learning X3D or VRML97
- a tool to load static/animated X3D/VRML97 files (directly or via Inline
  commands) created by programs like maya, 3D Studio MAX, Cinema4D, blender, 
  wings3d, art of illusion etc. and add interaction/scripting 
- a tool to manipulate 3D data with 3D input devices (e.g. joystick/spaceball)
- a tool to view 3D data with quadbuffer stereoview (e.g. shutterglases)
- a open framework to create or process 3D data and store it as a ISO standard 
"
    architecture HP-UX_B.11.11_32/64
    machine_type *
    os_name HP-UX
    os_release B.11.11
    os_version *
    directory /tmp/opt
    is_locatable false
    is_patch false
    fileset
        tag       "bin"
        title     "the commands, programs, and executables"
        architecture HP-UX_B.11.11_32/64
        machine_type *
        os_name HP-UX
        os_release B.11.11
        os_version *
        is_patch false
        is_sparse false
        is_kernel false
        is_reboot false
        directory    bin = /opt/white_dune/bin
        file         *
    end 
    fileset
        tag       "man"
        title     "the manual pages"
        architecture HP-UX_B.11.11_32/64
        machine_type *
        os_name HP-UX
        os_release B.11.11
        os_version *
        is_patch false
        is_sparse false
        is_kernel false
        is_reboot false
        directory    man = /opt/white_dune/man
        file         *
    end
    fileset
        tag       "docs"
        title     "documentation"
        architecture HP-UX_B.11.11_32/64
        machine_type *
        os_name HP-UX
        os_release B.11.11
        os_version *
        is_patch false
        is_sparse false
        is_kernel false
        is_reboot false
        directory    docs = /opt/white_dune/docs
        file         *
    end
end #&## product white_dune
EOT

(cd /tmp/opt/white_dune && \
 /usr/sbin/swpackage -d /tmp/white_dune -s /tmp/white_dune.psf && \
 cd /tmp && tar -cvf white_dune-hpux-$VERSION.tar white_dune)
