<chapter id="install">
<title>Install notes</title>

<sect1 id="requirement">
<title>Software Requirements</title>
<para>To compile and run DDCcontrol, you need to have these packages installed:</para>
<itemizedlist mark='bullet'>
<listitem>
<para>
<ulink url="http://www.xmlsoft.org/">libxml2</ulink>
</para>
</listitem>
<listitem>
<para>
<ulink url="http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml">pci-utils</ulink>
</para>
</listitem>
<listitem>
<para>
<ulink url="http://www.gtk.org/">gtk+&gt;=2.4</ulink>
</para>
</listitem>
</itemizedlist>
<para>In addition to the library packages, you also need the development
packages, which are not usually installed. For example, on Debian, their names
are <filename>libxml2-dev</filename>, <filename>pciutils-dev</filename> and
<filename>libgtk2.0-dev</filename>. Other distributions probably have similar
package names. On Fedora Core 5, you will also need
<filename>gnome-panel-devel</filename> package.
</para>
<note>
<para>
You don't need pci-utils if you don't use direct PCI memory access, and you 
don't need gtk+ if you don't plan to use the Gnome GUI. Usually, this is not the
case, so you will almost certainly want these packages for compiling ddccontrol.
</para>
</note>
</sect1>

<sect1 id="download">
<title>Download the sources</title>
<para>Go to the
<ulink url="http://sourceforge.net/project/showfiles.php?group_id=117933">
download section</ulink> of ddccontrol project's page and download the latest
<filename>ddccontrol</filename> and <filename>ddccontrol-db</filename>
source tarballs.</para>
<para>Then unpack these two archives with:</para>
<screen format="linespecific">
# tar xvfz ddccontrol-<replaceable>X.Y</replaceable>.tar.gz
# tar xvfz ddccontrol-db-<replaceable>YYYYMMDD</replaceable>.tar.gz
</screen>
<para>You should now have two directories, <filename>ddccontrol</filename> and
<filename>ddccontrol-db</filename>.</para>
</sect1>
 
<sect1 id="compile">
<title>Compile and install</title>
<para>To compile and install the source tarballs, type:</para>
<screen format="linespecific">
# ./configure
# make
# su root
Password: <userinput>&lt;root password&gt;</userinput>
# make install
</screen>
<para>You need to do this in <filename>ddccontrol</filename>
<emphasis>and</emphasis> <filename>ddccontrol-db</filename> directories.</para>
<para>If you set the <option>--prefix</option> parameter when configuring one
package, you must set it to the same value when configuring the other.</para>
</sect1>

<sect1 id="kerneli2c">
<title>Configure <filename>/dev/i2c-*</filename> devices</title>
<note><filename>/dev/i2c-*</filename> devices are only working with kernel 2.6
or greater.</note>
<para>If your graphics card is supported by <filename>/dev/i2c-*</filename> 
devices (see <xref linkend="supportedgc"/>), you must load the <filename>i2c-dev</filename>
module by typing, as root:</para>
<screen format="linespecific">
# modprobe i2c-dev
</screen>
<para>You must also load your graphics card framebuffer driver (for
card-specific instructions see <xref linkend="supportedgc"/>).</para>
<para>If you want to automatically load these modules when Linux starts, see 
your distribution's documentation.</para>
<para>On systems not using devfs, even after loading framebuffer and i2c-dev modules,
the devices <filename>/dev/i2c/*</filename> or <filename>/dev/i2c-*</filename> does not
exist. On Debian, these devices are created using this command :</para>
<screen format="linespecific">
# /sbin/MAKEDEV i2c
</screen>
<para>To allow standard (i.e. non-root) users to use DDCcontrol, you must change
permissions on <filename>/dev/i2c-*</filename>. This is done by typing, as 
root:</para>
<screen format="linespecific">
# chmod a+rw /dev/i2c-*
</screen>
<sect2>
<title>Kernel configuration options</title>
<para>If <filename>i2c-dev</filename> or your graphics card's framebuffer
modules are not available with your kernel, you can build your own kernel with
the following options turned on (with recommend to build them as modules):
</para>
<itemizedlist mark='bullet'>
<listitem>
<menuchoice>
  <guimenu>Devices drivers</guimenu>
  <guimenuitem>I2C support</guimenuitem>
</menuchoice>.
</listitem>
<listitem>
<menuchoice>
  <guimenu>Devices drivers</guimenu>
  <guimenuitem>I2C support</guimenuitem>
  <guimenuitem>I2C device interface</guimenuitem>
</menuchoice>.
</listitem>
<listitem>
<menuchoice>
  <guimenu>Devices drivers</guimenu>
  <guimenuitem>Graphics support</guimenuitem>
  <guimenuitem>Framebuffer support</guimenuitem>
</menuchoice>.
</listitem>
<listitem>
and a specific driver for your graphic card (see <xref linkend="supportedgc"/>).
</listitem>
</itemizedlist>
</sect2>
</sect1>

<sect1 id="debian">
<title>Installation on Debian (and derivatives)</title>
<para>The ddccontrol and ddccontrol-db packages are available in Debian (and
derivatives).  You simply need to install the ddccontrol package and all the
proper dependencies will be installed along with it.  For example:</para>
<screen format="linespecific">
# apt-get install ddccontrol
</screen>
</sect1>
</chapter>
