<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
	<!ENTITY % global_entities SYSTEM "../common/global.ent">
	%global_entities;
]>-->
<appendix id="appen-building">
  <title>Building</title>
  <para>Since not all computer operating systems are configured in the same standard way and their
    environments differ, there is a need to build packages that are specifically build to accommodate
    the needs of the various target systems. Many Linux distributions use the Red Hat Package
    Manager as the tool of choice managing packages. This quote explains what RPM is:</para>
  <para>
    <blockquote><attribution>
        <ulink url="http://www.rpm.org">rpm.org</ulink>
      </attribution><para>The RPM Package Manager (RPM) is a powerful command line driven package management
      system capable of installing, uninstalling, verifying, querying, and updating computer
      software packages. Each software package consists of an archive of files along with
      information about the package like its version, a description, and the like. There is also a
      related API (&quot;Application Program Interface&quot;), permitting advanced
      developers to bypass &apos;shelling out&apos; to a command line, and to manage such
      transactions from within a native coding language.</para>
    </blockquote>
  </para>
  <para>While RPM is a standard tool for managing software packages it is not necessarily true that
    all software packages made with RPM can be installed on all Linux distributions. The reason
    being is that very often the various &apos;distro&apos; have arranged their file and
    folder systems in ways that are different to greater or lesser degrees, depending on which two
    you compare. As a result it is recommended that a software is installed with a RPM that is
    specifically configured for the target operating system and its environment.</para>
  <para>The tool used to build RPM packages is called <application
    class="software">rpmbuild</application>. It is a command line tool, which is a part of the Red
    Hat Package Manager (RPM), that enables building of the following software package types:</para>
  <variablelist>
    <varlistentry>
      <term>binary</term>
      <listitem>
        <para>Contains software to be installed</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>source</term>
      <listitem>
        <para>Contains the source code and recipe necessary to produce binary packages</para>
      </listitem>
    </varlistentry>
  </variablelist>
  <para>A package consists of an archive of files and meta-data used to install and erase the
    archive files. The meta-data includes helper scripts, file attributes, and descriptive
    information about the package. So a package holds together all the information required to
    install and unistall a piece of software.</para>
  <para>This appendix covers only the most basic information needed for package builders. It assumes
    experience with building and testing packages, especially resolving problems to configure for
    the target system. If you wish to build packages for a particular system using RPM and need more
    information about RPM a good resource to read is &quot;<ulink
      url="http://rpm-devel.colug.net/max-rpm/index.html">Maximum RPM</ulink>&quot; by Edward C.
    Bailey, Paul Nasrat, Matthias Saou, Ville Skyttä.</para>
  <para>In combination with this book wee give a pretty good overview of how you can build packages
    for &esvn;. However, before you decide to go through all this work you may first want to
    check at the &esvn; <ulink url="http://esvn.umputun.com">Web Site</ulink> to see if somebody
    has already built a package for your system.</para>
  <sect1>
    <title>Prerequisites</title>
    <para>To build &esvn; the following packages and their dependencies must be installed and
      available on the build machine:</para>
    <itemizedlist>
      <listitem>
        <para>qt3-devel</para>
      </listitem>
      <listitem>
        <para>GNU Make</para>
      </listitem>
      <listitem>
        <para>RPM</para>
      </listitem>
      <listitem>
        <para>A copy of the &esvn; sources.</para>
      </listitem>
    </itemizedlist>
  </sect1>
  <sect1>
    <title>Building a Binary Package</title>
    <para>Text</para>
    <!-- "rpmbuild -ta esvn-<version>-<release>.tar.gz"-->
  </sect1>
  <sect1>
    <title>Building a Source Binary package</title>
    <para>Text</para>
    <!--  srpm (rpmbuld -bb something.srpm) -->
  </sect1>
</appendix>
