Difference between revisions of "Basic Debian Packaging"

From FreekiWiki
Jump to navigation Jump to search
(→‎creating debian directory: example for dh_make)
(→‎environment variables: "simplified" example setting variables)
Line 23: Line 23:
 
====environment variables====
 
====environment variables====
 
* DEBEMAIL
 
* DEBEMAIL
export DEBEMAIL=yourname@example.com
 
 
* DEBFULLNAME
 
* DEBFULLNAME
export DEBFULLNAME="Your Name Here"
 
 
* EDITOR
 
* EDITOR
  export EDITOR=nano
+
 
 +
DEBEMAIL=yourname@example.com
 +
  EDITOR=nano
 +
DEBFULLNAME="Your Name Here"
 +
export DEBEMAIL DEBFULLNAME EDITOR
  
 
====creating debian directory====
 
====creating debian directory====

Revision as of 17:28, 24 March 2006

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 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
  • EDITOR
DEBEMAIL=yourname@example.com 
EDITOR=nano
DEBFULLNAME="Your Name Here"
export DEBEMAIL DEBFULLNAME EDITOR

creating debian directory

  • using dh_make (package dh-make)
dh_make -s -c gpl
  • dh-make-perl

contents of a debian directory

  • copyright
    • add copyright holder's name and relevent copyright
egrep -ri copyright * | less
  • changelog
    • dch
dch -i
    • version
    • release
  • control
  • rules
  • other files
    • *.install
    • *.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
# uncomment the next line if using a autotools-based source
#include /usr/share/cdbs/1/class/autotools.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

  • lesspipe
lesspipe ../hello_2.1.1_i386.deb | less
  • build dependencies
  • package dependencies
    • install in a clean debian base-install
    • pbuilder/sbuild

lintian

  • debian policy checker
lintian -i ../hello_2.1.1_i386.deb

additional and related topics