#!/bin/sh

BUILDDIR=`dirname $PWD`

cat > ~/.pbuilderrc <<EOT
export TMPDIR=/tmp
AUTO_DEBSIGN=yes
PKGNAME_LOGFILE=yes
BUILDRESULT=$BUILDDIR
# BINDMOUNTS="/home/vagrant/_pbuilder_local_deps /dev/shm"
# This is a workaround a problem that /dev/shm is not mounted in pbuilder chroot
BINDMOUNTS="/dev/shm"
EOT

# Aufruf für binary-only build:
#   pdebuild --debbuildopts "-B"
/usr/bin/pdebuild --pbuilder cowbuilder --debbuildopts "-i\.git -I.git $*" --debsign-k "Andreas Tille <tille@debian.org>" --debbuildopts -sa
cd ..
lintian -i *.deb *.dsc
