Difference between revisions of "Basic Debian Packaging"

From FreekiWiki
Jump to navigation Jump to search
(a few tweaks and additional info)
(more formatting)
Line 1: Line 1:
this class should give a basic understanding of how to build a debian package from some common types of source tarballs or repositories.
+
===overview===
 +
this class should give a basic understanding of how to build a debian package from some common types of source tarballs or repositories, with the assistance of several helper utilities.
  
===prerequisites===
+
===background===
 +
====prerequisites====
 
* basic familiarity with [[Basic_Linux_Command_Line_for_Builders|commandline]]
 
* basic familiarity with [[Basic_Linux_Command_Line_for_Builders|commandline]]
 
* basic familiarity with [[Where_Is_Everything|linux]]
 
* basic familiarity with [[Where_Is_Everything|linux]]
  
===suggested background===
+
====suggested background====
 
* rudimentary understanding of building and compiling software
 
* rudimentary understanding of building and compiling software
 
* basic understanding of apt and dpkg
 
* basic understanding of apt and dpkg
Line 47: Line 49:
 
* add cdbs to build-depends or build-depends-indep debian/control
 
* add cdbs to build-depends or build-depends-indep debian/control
 
====debuild====
 
====debuild====
* commandline arguments: -us -uc
+
* commandline arguments: -uc -us
* basic troubleshooting
+
====basic troubleshooting====
** build dependencies
+
* build dependencies
** package dependencies
+
* package dependencies
*** install in a clean debian base-install
+
** install in a clean debian base-install
*** pbuilder/sbuild
+
** pbuilder/sbuild
 
====lintian====
 
====lintian====
 
* debian policy checker
 
* debian policy checker
  
===additional and related topics:===
+
===additional and related topics===
 
* [[Debian_Package_Repositories]]
 
* [[Debian_Package_Repositories]]
 
* gnupg-signed packages
 
* gnupg-signed packages
  
 
[[Category:Classes]]
 
[[Category:Classes]]

Revision as of 10:09, 9 December 2005

overview

this class should give a basic understanding of how to build a debian package from some common types of source tarballs or repositories, with the assistance of several helper utilities.

background

prerequisites

suggested background

  • rudimentary understanding of building and compiling software
  • basic understanding of apt and dpkg
  • basic understanding of cvs or subversion

topics covered

finding software

  • is it already packaged:
    • packages.debian.org
  • other sources of software:
    • freshmeat.net
    • sourceforge.net
    • google.com

environment variables

  • DEBEMAIL
  • DEBFULLNAME

creating debian directory

  • using dh_make (package dh-make)
  • dh-make-perl

contents of a debian directory

  • copyright
  • changelog
    • dch
    • version
    • release
  • control
  • rules
  • other files
    • *.installi
    • *.manpages
    • *.examples
    • *.init
    • *.postinst
  • other examples: *.ex and *.EX files

cdbs basics:

  • magic snippet for a complete debian/rules file:
#!/usr/bin/make -f
# uncomment the next line if using a makefile-based source
#include /usr/share/cdbs/1/class/makefile.mk
include /usr/share/cdbs/1/rules/debhelper.mk
  • add cdbs to build-depends or build-depends-indep debian/control

debuild

  • commandline arguments: -uc -us

basic troubleshooting

  • build dependencies
  • package dependencies
    • install in a clean debian base-install
    • pbuilder/sbuild

lintian

  • debian policy checker

additional and related topics