# 1 - Building, Installing, and Packaging Mini-XML

This chapter describes how to build, install, and package Mini-XML on your system.

## Compiling Mini-XML

Mini-XML comes with an autoconf-based configure script; just type the following command to get things going:

        ./configure ENTER

The default install prefix is /usr/local, which can be overridden using the `--prefix` option:

        ./configure --prefix=/foo ENTER

Other configure options can be found using the `--help` option:

        ./configure --help ENTER

Once you have configured the software, use the `make(1)` program to do the build and run the test program to verify that things are working, as follows:

        make ENTER

## Installing Mini-XML

Use the `make` command with the `install` target to install Mini-XML in the configured directories:

        make install ENTER

If you are using Mini-XML under Microsoft Windows with Visual C++, use the included project files in the vcnet subdirectory to build the library instead.

## Creating Mini-XML Packages

Mini-XML includes two files that can be used to create binary packages. The first file is mxml.spec which is used by the `rpmbuild(8)` software to create Red Hat Package Manager ("RPM") packages which are commonly used on Linux. Since `rpmbuild` wants to compile the software on its own, you can provide it with the Mini-XML tar file to build the package:

        rpmbuild -ta mxml-version.tar.gz ENTER

The second file is mxml.list which is used by the `epm(1)` program to create software packages in a variety of formats. The `epm` program is available from the following URL:

        http://www.easysw.com/epm/

Use the `make` command with the `epm` target to create portable and native packages for your system:

        make epm ENTER

The packages are stored in a subdirectory named dist for your convenience. The portable packages utilize scripts and tar files to install the software on the target system; this is especially useful when installing on systems with different Linux distributions. Use the mxml.install script to install the software and mxml.remove script to remove the software.

The native packages will be in the local OS's native format: RPM for Red Hat Linux, DPKG for Debian Linux, PKG for Solaris, and so forth. Use the corresponding commands to install the native packages.