# $Id: INSTALL,v 1.1 2005-07-29 03:55:29 jhoblitt Exp $

Using the psmetadb meta-database API generator
--

- Step 1

Checkout the psmetadb module from Pan-STARRS CVS.  If you need help setting up
CVS please see this article:

    http://pan-starrs.ifa.hawaii.edu/project/resources/ps-cvs.html

$ cvs co psmetadb
$ cd psmetadb

- Step2

Create a MetadataConfig file that describes the table you want to access.  The
MetadataConfig file syntax is described in the pslib SDRS.  psmetadb specific
details are included in the "md2db.pl" Pod. For reference, an example named
foo.md is provided

$ perldoc md2db.pl
.
.

$ cat foo.md
table   STR     foo
foo     STR     60      # Primary Key
bar     S32     0
baz     F32     0.0
boing   F64     0.0
zot     BOOL    t       # Key

- Step3

Generate the database bindings with the "md2db.pl" program.  The example foo.md
file will generate code under the directory "foodb".

$./md2db.pl -i foo.md
$ cd foodb

- Step4

Package the software for distribution.  This is the same as for any 'standard'
autotools package.  Please note that you must have pslib installed for the step
to complete.  If you need help installing pslib please see this article:

    http://pan-starrs.ifa.hawaii.edu/project/IPP/software/jhbuild/

$ jhbuild shell
$ ./autogen.sh && make dist

This should generate two packages suitable for distribution.

$ ls -la foodb-*
-rw-r--r--  1 jhoblitt users 216367 Jul 28 17:54 foodb-0.0.1.tar.bz2
-rw-r--r--  1 jhoblitt users 324926 Jul 28 17:54 foodb-0.0.1.tar.gz

The End.
