Debuild in its most basic form prepares the package by running dpkg-buildpackage, and then runs lintian on the package as well.

  1. Put this in ~/.profile (replace with your own values of course):

    export DEBFULLNAME="My Name"

    Source the profile:

    apprentice@host:~/packaging$ . ~/.profile

  2. apprentice@host:~/packaging$ apt-get source tar
    apprentice@host:~/packaging$ cd tar-1.27.1

  3. apprentice@host:~/packaging/tar-1.27.1$ debuild

  4. apprentice@host:~/packaging/tar-1.27.1$ sudo apt-get install  libacl1-dev libattr1-dev libselinux1-dev
    apprentice@host:~/packaging/tar-1.27.1$ debuild -us -uc --lintian-opts -i

    (That tells debuild not sign the package, and to have lintian explain its complaints.)

  5. (Also removing those of building bash):

    apprentice@host:~/packaging/tar-1.27.1$ apt-get purge libacl1-dev libattr1-dev libselinux1-dev bison texi2html gettext sharutils
    apprentice@host:~/packaging/tar-1.27.1$ apt-get autoremove