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 4. Getting git-buildpackage ready
Installing git-buildpackage
apt-get install git-buildpackage
Configuring git-buildpackage
Add these settings to ~/.gbp.conf
:
<snip> [DEFAULT] builder = /usr/bin/pdebuild [git-buildpackage] 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 = .. <snip>
Create a chroot for another architecture
sudo ARCH=i386 DIST=wheezy cowbuilder --create
Procedure 5. Using git-buildpackage
Get the package source
apprentice@host:~/packaging$ apt-get source -d hello
apprentice@host:~/packaging$ mkdir hello.git
apprentice@host:~/packaging$ cd hello.git
Make it a git repository
apprentice@host:~/packaging/hello.git$ git init
apprentice@host:~/packaging/hello.git$ git-import-dsc ../hello_2.8-4.dsc
Build the package
apprentice@host:~/packaging/hello.git$ ARCH=i386 DIST=wheezy git-buildpackage