README for CMPI Files And Directories Sample Provider
=====================================================

Author: Viktor Mihajlovski <mihajlov@de.ibm.com>

Last Update 03/24/2005

Purpose:
--------

This provider package serves demonstration purposes and is not meant
to be of any practical use.
On one hand it illustrates how to write CMPI providers using a three-tiered
approach (provider, utility layer and resource access encapsulation).
Further, it shows how to utilize autoconf and automake in order to create
a CMPI provider package that can be deployed under a variety of CIM Servers.

Requirements:
-------------

Build-Time:
- Linux or similar environment supported by autoconf-generated configure script
- CMPI Header files. Either the ones coming with a CIM server or a standalone
  development package like the following 
  http://prdownloads.sourceforge.net/sblim/sblim-cmpi-devel-0.9.0.tar.bz2

Run-Time:
- Linux or similar environment (supporting the file system operations)
- A CIM Server supporting CMPI providers.

The Providers:
--------------

The instrumented model consists of CIM classes representing plain files and
directories in a file system and the associations between them.
The classes are named CWS_PlainFile, CWS_Directory and 
CWS_DirectoryContainsFile . The provider basically maps the content of 
the directory subtree as defined in CWS_FileUtils.h and can be adapted
by changing the value of the CWS_FILEROOT macro.

The Build Setup:
----------------

The package is based on the GNU autoconf and automake tools, the relevant files
are:
acinclude.m4		CMPI specific checking functions
configure.ac		Configuration input file
Makefile.am		Build rules and targets
sblim-cmpi-fad.spec.in	RPM Spec template

The generated configure script tries to determine where the CMPI header files
are located. For this purpose it searches a set of well-known locations.
The "canonical" location is /usr/include/cmpi or /usr/local/include/cmpi,
depending on how configure is invoked.

Further, configure "determines" where providers are to be installed. Actually,
there's no detection logic. The provider directory will always be
/usr/lib/cmpi or /usr/local/lib/cmpi. If a CIM server requires a particular
directory this can be selected by specifying the PROVIDERDIR variable.

And finally, configure tries to find out which CIM server type is being used.
This is necessary in order to select the appropriate schema and provider
registration technique. If the CIM server is not or incorrectly identified,
it is possible to specify it via the CIMSERVER variable.
Supported values are pegasus, sfcb, openwbem and sniacimom.

For instance, in order to configure for a locally installed Pegasus you can
issue the following command:
./configure CIMSERVER=pegasus PROVIDERDIR=$PEGASUS_HOME/provider \
     --libdir=$PEGASUS_HOME/lib

For more details, have a look at the files mentioned above.
