#!/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 "
                The white_dune program is a graphical X3DV/VRML97 
                editor, simple NURBS/Superformula 3D modeller and 
                animation tool. X3D and VRML97 are the ISO standards 
                for displaying 3D data over the web. 
                This includes support for animation, 
                realtime interaction and multimedia (image, 
                movie, sound). VRML97 can be written by popular 
                programs like maya, catia, 3D Studio MAX, 
                cinema4D, blender, wings3d and others, but 
                (unlike white_dune) most of this programs support 
                only a small part of the X3D/VRML97 features. Dune 
                can read X3DV/VRML97 files, display and let the user 
                change the scenegraph and all fields of all 
                nodes. Some documentation how to use dune is 
                included. The most powerfull 3D modelling 
                features of white_dune support the X3D/VRML97 
                Amendment1 style NURBS nodes and Superformula 
                based PROTOs. This is mainly convenient for 
                building some rounded shapes. For artistic mesh 
                modelling work, the usage of a static 3D modeller 
                with VRML97 export features may be useful. The 
                result can be either used unchanged in a bigger 
                X3DV/VRML97 file via the Inline command without 
                breaking the toolchain or improved in white_dune. 
                Examples for free (speech) static 3D modellers 
                with VRML97 export available are blender, 
                wings3d, art of illusion or sharp construct. 
                white_dune support some 3D inputdevices like all 
                devices supported via the Xinput protocol. 
                White_dune support quadbuffer stereo visuals. 
                This version of white_dune support both english 
                and german menus and messages. Information how to 
                translate white_dune to foreign languages can be 
                found under 
                docs/developer_docs/dune_developer.html#localisation"
    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)
