PBuilder Config

Create the following ~/.pbuilderrc:

#PDEBUILD_PBUILDER=pbuilder
PDEBUILD_PBUILDER=cowbuilder

if [ -n "${DIST}" ]; then
    #echo ".pbuilderrc detects DIST ${DIST}, while DISTRIBUTION is ${DISTRIBUTION}"
    export DISTRIBUTION=$DIST

    AUTO_DEBSIGN=yes

    BASETGZ="$(dirname $BASETGZ)/$DIST-base.tgz"

    export BASEPATH=/var/cache/pbuilder/${DIST}-base.cow
    export BUILDPLACE=/var/cache/pbuilder/${DIST}.cow

    install -d ../lastbuild/${DIST}
    export BUILDRESULT=../lastbuild/${DIST}

    if echo $@|grep -qe --create ; then
        BUILDPLACE=/var/cache/pbuilder/${DIST}-base.cow
        install -d ${BUILDPLACE}
    fi

    APTCACHE="/var/cache/pbuilder/$DIST/aptcache/"

    case ${DIST} in
        'lenny'|'squeeze'|'wheezy'|'sid' )
            MIRRORSITE=http://osmirror.rug.nl/debian
            MIRRORSITE=http://ftp.nl.debian.org/debian
            case ${DIST} in
                'sid' )
                    MIRRORSITE=http://ftp.nl.debian.org/debian
                    ;;
            esac
            ;;
        'lucid'|'maverick'|'natty'|'oneiric'|'precise' )
            MIRRORSITE=http://osmirror.rug.nl/ubuntu
            ;;
    esac

fi