\documentclass[10pt]{article}

\newenvironment{nospitem}{\begin{list}{}{
  \setlength{\itemsep}{0.01ex}
  \setlength{\parsep}{0.01ex}
  \renewcommand{\makelabel}{\hfill\bf -\hfill}}}{\end{list}}
\pagestyle{empty}
\setlength{\textwidth}{7.4in}\setlength{\textheight}{9.5in}
\setlength{\parindent}{0em}
% Needed for my weird printer
\setlength{\voffset}{-1.0in}
\setlength{\hoffset}{-1.4in}

\begin{document}

\begin{center}
\textbf{\large Building Debian Packages by Example: Packaging libgnupg-perl \\
        Chris Fearnley \quad cjf@LinuxForce.net \quad
        http://www.LinuxForce.net }
\end{center}

We will demonstrate the building of a Debian package by preparing a .deb
file and source packages for libgnupg-perl, a Perl Interface for Gnu
Privacy Guard (GnuPG.pm). Since this is a perl library module a few extra
considerations are applicable. However, GnuPG.pm is still very simple
so this session will be appropriate for those new to Debian development.

\begin{enumerate}
  \item Unpack the upstream source into a pristine directory named
    libgnupg-perl-version
  \item Debianize the directory by cd'ing into it and running \\
    \texttt{dh\_{}make -e your.maintainer@address -f ../pristine-source.tar.gz}
  \item Examine the upstream source
    (http://indev.insu.com/GnuPG/gnupg.html)
  \item Write a short description of the package

Perl Interface to Gnu Privacy Guard (GPG)

  \item Write a long description for the package

GnuPG is a perl module that interfaces with the Gnu Privacy Guard using
the coprocess hooks provided by gpg. The communication mechanism uses
shared memory and a status file descriptor.  There are other perl
interfaces to PGP and GnuPG but none of them use the coprocess interface
provided by gpg.

The module tries its best to map the rather interactive interface of
gpg to a more programmatic API.  The module offers a tied file handle
interface to encryption and decryption making it easier to use.

  \item Post an ``ITP'' (Intent To Package) e-mail announcement that you
    are working on the package to \\
    debian-devel@lists.debian.org

  \item Verify the license is DFSG (Debian Free Software Guidelines)
    complient
  \item Write a man page if the package doesn't already provide one
  \item Write a debian/control file
  \item Write a debian/copyright file
  \item Write a debian/rules file
  \item Build the package
    \begin{enumerate}
    \item (Skip this step for scripts) Build the executables \texttt{debian/rules build}
    \item Build the binary package (.deb) \texttt{debian/rules binary}
    \end{enumerate}

  \item Test the package
  \begin{enumerate}
    \item \texttt{ls -alR debian/tmp*}
    \item \texttt{dpkg -c ../libgnupg-perl-version.deb}
    \item \texttt{dpkg -I ../libgnupg-perl-version.deb}
    \item \texttt{dpkg -i ../libgnupg-perl-version.deb}
    \item \texttt{lintian ../libgnupg-perl-version.deb}
  \end{enumerate}
  \item Install the package (\texttt{dpkg -i ../libgnupg-perl-version.deb)}
  \item Test the package some more
  \begin{enumerate}
    \item Does it work
    \item \texttt{dpkg -L libgnupg-perl}
    \item \texttt{dpkg -s libgnupg-perl}
    \item Install it on at least one system on which the package was not
       built (to ensure the package includes all components necessary
       to work).
    \item \texttt{--remove} the package and then reinstall.  Any errors?
    \item Are the maintainer's scripts idempotent?  Try running them
      multiple times.
  \end{enumerate}
\end{enumerate}

\end{document}
