There's one more layer of wrappers to be laid. Git-buildpackage keeps the packaging material in a git repository, and the packaging is done straight from the committed data, not from the state of the current directory.

Procedure 12.  Getting git-buildpackage ready
  1. apt-get install git-buildpackage

  2. Add these settings to ~/.gbp.conf:

    builder = /usr/bin/pdebuild
    sign-tags = True
    keyid = BCB62767
    # Dir relative to .. is made/found by pdebuild. For cowbuilder/git-pbuilder, different settings are needed
    export-dir = ..
    tarball-dir = ..

  3. sudo ARCH=i386 DIST=wheezy cowbuilder --create

Procedure 13.  Using git-buildpackage
  1. apprentice@host:~/packaging$ apt-get source -d hello
    apprentice@host:~/packaging$ mkdir hello.git
    apprentice@host:~/packaging$ cd hello.git

  2. apprentice@host:~/packaging/hello.git$ git init
    apprentice@host:~/packaging/hello.git$ git-import-dsc ../hello_2.8-4.dsc

  3. apprentice@host:~/packaging/hello.git$ ARCH=i386 DIST=wheezy git-buildpackage