Git-Buildpackage

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

  1. Installing git-buildpackage

    apt-get install git-buildpackage

  2. 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>
    	  

  3. Create a chroot for another architecture

    sudo ARCH=i386 DIST=wheezy cowbuilder --create

Procedure 5.  Using git-buildpackage

  1. Get the package source

    apprentice@host:~/packaging$ apt-get source -d hello
    apprentice@host:~/packaging$ mkdir hello.git
    apprentice@host:~/packaging$ cd hello.git

  2. 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

  3. Build the package

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