<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.docbook.org/xml/4.4/docbookx.dtd">
<!--
#
# This file is part of Freedom Maker.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
-->
<refentry>
  <refmeta>
    <refentrytitle><application>freedom-maker</application></refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="manual">FreedomBox Manual</refmiscinfo>
    <refmiscinfo class="version">0.8</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname><application>freedom-maker</application></refname>
    <refpurpose>
      image builder for FreedomBox
    </refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>freedom-maker</command>
        <arg> <option>--build-stamp</option></arg>
        <arg> <option>--image-size</option></arg>
        <arg> <option>--build-mirror</option></arg>
        <arg> <option>--mirror</option></arg>
        <arg> <option>--distribution</option></arg>
        <arg> <option>--include-source</option></arg>
        <arg> <option>--package</option></arg>
        <arg> <option>--custom-package</option></arg>
        <arg> <option>--build-dir</option></arg>
        <arg> <option>--log-level</option></arg>
        <arg> <option>--hostname</option></arg>
        <arg> <option>--sign</option></arg>
        <arg> <option>--force</option></arg>
        <arg> <option>targets</option></arg>     
        <arg><option>-h, </option><option>--help</option></arg>
   </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>
    <para>
      FreedomBox is a community project to develop, design and promote
      personal servers running free software for private, personal
      communications.  It is a networking appliance designed to allow
      interfacing with the rest of the Internet under conditions of
      protected privacy and data security.  It hosts applications such
      as blog, wiki, website, social network, email, web proxy and a
      Tor relay on a device that can replace a wireless router so that
      data stays with the users.
    </para>
    <para>
      freedom-maker is a tool to build FreedomBox images for various single
      board computers, virtual machines and general purpose computers.
    </para>
  </refsect1>

  <refsect1>
    <title>Options</title>
    <variablelist>
      <varlistentry>
        <term> <option>--build-stamp</option></term>
         <listitem>
          <para>
            Build stamp to use on image file names
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--image-size</option></term>
         <listitem>
          <para>
            Size of the image to build
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--build-mirror</option></term>
         <listitem>
          <para>
            Debian mirror to use for building
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--mirror</option></term>
         <listitem>
           <para>
             Debian mirror to use in built image
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--distribution</option></term>
         <listitem>
           <para>
             Debian release to use in built image
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--include-source</option></term>
         <listitem>
           <para>
             Whether to include source in build image,
             False by default
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--package</option></term>
         <listitem>
           <para>
             Install additional packages in the image
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--custom-package</option></term>
         <listitem>
           <para>
             Install package from DEB file into the image
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--build-dir</option></term>
         <listitem>
           <para>
             Directory to build images and create log file
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--log-level'</option></term>
         <listitem>
           <para>
             The logging level - choose one of ('critical',
             'error', 'warn', 'info', 'debug'). Default log level
             is 'debug'.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--hostname</option></term>
         <listitem>
          <para>
            Hostname to set inside the built images
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--sign</option></term>
         <listitem>
           <para>
             Sign the images with default GPG key after building
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>--force</option></term>
         <listitem>
           <para>
             Force rebuild of images even when required image exists
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term> <option>targets</option></term>
        <listitem>
          <para>
            Image targets to build. Choose one or more of raspberry2,
            raspberry3, raspberry3-b-plus, beaglebone, cubieboard2, cubietruck,
            a20-olinuxino-lime, a20-olinuxino-lime2, a20-olinuxino-micro, i386,
            amd64, virtualbox-i386, virtualbox-amd64, qemu-i386, qemu-amd64,
            pcduino3, banana-pro
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Examples</title>

    <example>
      <title>Build BeagleBone image</title>
      <synopsis>$ freedom-maker beaglebone</synopsis>
      <para>
        Build a FreedomBox image for the BeagleBone Single Board Computer.
      </para>
    </example>

    <example>
      <title>Build all images</title>
      <synopsis>$ python3 -m freedommaker raspberry2 raspberry3 raspbery3-b-plus
      beaglebone cubieboard2 cubietruck a20-olinuxino-lime a20-olinuxino-lime2
      a20-olinuxino-micro i386 amd64 virtualbox-i386 virtualbox-amd64 qemu-i386
      qemu-amd64 pcduino3 banana-pro</synopsis>
      <para>
        Build all the available FreedomBox images using freedom-maker.
      </para>
    </example>
  </refsect1>

  <refsect1>
    <title>Bugs</title>
    <para>
      See the <ulink url="https://github.com/freedombox/freedom-maker/issues">freedom-maker
      issue tracker</ulink> for a full list of known issues and TODO items.
    </para>
  </refsect1>

  <refsect1>
    <title>Author</title>
    <para>
      <author>
        <firstname>FreedomBox Developers</firstname>
        <contrib>Original author</contrib>
      </author>
    </para>
  </refsect1>
</refentry>
