Debian

Table of Contents

Debian vs Ubuntu discussion

dch (debchange) reference

sudo apt-get install devscripts
# Create initial `debian/changelog`, content would look like following:
# -------------------------------------------------------------------------------
# my-package (2.11.2-b145b232a) unstable; urgency=low
#
#   * Built automatically
#
#  -- Yeongho Kim <yeonghoey@yhws>  Wed, 18 Oct 2017 17:09:58 +0900
# -------------------------------------------------------------------------------
debchange \
  --create \
  --package      "my-package" \
  --newversion   "${VERSION}" \
  --distribution "unstable" \
  --urgency      "low" \
  "Built automatically"

.deb files reference

dpkg reference

-i, --install <package-file...>
  1. Extract the control files of the new package.
  2. If another version of the same package was installed before the new installation, execute prerm script of the old package.
  3. Run preinst script, if provided by the package.
  4. Unpack the new files, and at the same time back up the old files, so that if something goes wrong, they can be restored.
  5. If another version of the same package was installed before the new installation, execute the postrm script of the old package. Note that this script is executed after the preinst script of the new package, because new files are written at the same time old files are removed.
  6. Configure the package. See --configure for detailed information about how this is done.

<package>.postinst reference

Create a debian pacakge howto

Source package

Files in debian/

debian/changelog

mpich2 (1.2.1.1-5) unstable; urgency = low
  * Descriptions
 -- Lucas Nussbaum <lucas@debian.org> Wed, 15 Sep 2010 18:13:44 +0200

debian/control

Package metadata like
Package name, section, priority, maintainer, uploaders, build-dependencies, dependencies, description, homepage
Source : wget
Section : web
Priority : important
Maintainer : Noel Kothe < noel@debian.org >
Build - Depends : debhelper (>> 5.0.0) , gettext , texinfo ,
libssl - dev ( >= 0.9.8) , dpatch , info2man
Standards - Version : 3.8.4
Homepage : http://www.gnu.org/software/wget/
Package : wget
Architecture : any
Depends : ${ shlibs : Depends }, ${ misc : Depends }
Description : retrieves files from the web
Wget is a network utility to retrieve files from the Web

debin/rules

debian/compat

debhelper

dh

#!/ usr / bin / make -f
%:
  dh $@
override_dh_auto_configure :
  dh_auto_configure -- -- with - kitchen - sink
override_dh_auto_build :
  make world

Patch systems

Doing things during installation and removal

Packaging with a VCS

Links