# Debian packaging manual

## 0.1 Abstract

This manual describes the technical aspects of creating Debian binary and source packages. It also documents the interface between `dselect` and its access method scripts. It does not deal with the Debian Project policy requirements, and it assumes familiarity with `dpkg`'s functions from the system administrator's perspective.

## 0.2 Table of contents

- 1 Introduction and scope of this manual
- 2 Binary packages
  - 2.1 Creating package files - `dpkg-deb`
  - 2.2 Package control information files
  - 2.3 The main control information file: `control`
- 3 Source packages
  - 3.1 Tools for processing source packages
  - 3.2 The Debianised source tree
  - 3.3 Source packages as archives
  - 3.4 Unpacking a Debian source package without `dpkg-source`
- 4 Control files and their fields
  - 4.1 Syntax of control files
  - 4.2 List of fields
- 5 Version numbering
- 6 Package maintainer scripts and installation procedure
  - 6.1 Introduction to package maintainer scripts
  - 6.2 Summary of ways maintainer scripts are called
  - 6.3 Details of unpack phase of installation or upgrade
  - 6.4 Details of configuration
  - 6.5 Details of removal and/or configuration purging
- 7 Descriptions of packages - the `Description` field
  - 7.1 Types of formatting line in the extended description
  - 7.2 Notes about writing descriptions
  - 7.3 Example description in control file for Smail
- 8 Declaring relationships between packages
  - 8.1 Syntax of relationship fields
  - 8.2 Dependencies - `Depends`, `Recommends`, `Suggests`, `Pre-Depends`
  - 8.3 Alternative packages - `Conflicts` and `Replaces`
  - 8.4 Virtual packages - `Provides`
  - 8.5 `Replaces` - overwriting files and replacing packages
  - 8.6 Defaults for satisfying dependencies - ordering
- 9 Configuration file handling
  - 9.1 Automatic handling of configuration files by `dpkg`
  - 9.2 Fully-featured maintainer script configuration handling
- 10 Alternative versions of an interface - `update-alternatives`
- 11 Diversions - overriding a package's version of a file
- 12 Shared libraries
  - 12.1 The `shlibs` File Format
  - 12.2 Further Technical information on `shlibs`
- 13 `dselect`'s interface to its installation methods
  - 13.1 Functions of the method scripts
  - 13.2 Location and arguments of the method scripts
- 14 Conversion procedure from old source packages

## 0.3 Copyright

Copyright ©1996 Ian Jackson.

This manual is free software; you may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This 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 with your Debian GNU/Linux system, in `/usr/doc/copyright/GPL`, or with the `dpkg` source package as the file `COPYING`. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Debian packaging manual - Copyright ©1996 Ian Jackson.
Contents; abstract.