diff options
author | dancer <dancer> | 2001-08-23 15:24:47 +0000 |
---|---|---|
committer | dancer <dancer> | 2001-08-23 15:24:47 +0000 |
commit | a40fac046c13f6377999ec878421e949643fb86d (patch) | |
tree | 6d57a376050b8ab489e53243ce4dc1ae727951a3 | |
parent | d8ea72daf666ac592ea2c73383dcb835a33fb2fc (diff) | |
download | pbuilder-a40fac046c13f6377999ec878421e949643fb86d.tar pbuilder-a40fac046c13f6377999ec878421e949643fb86d.tar.gz |
supports dsc-building with pbuilder
-rwxr-xr-x | pbuilder-buildpackage.sh | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/pbuilder-buildpackage.sh b/pbuilder-buildpackage.sh index 13117ed..d0d311b 100755 --- a/pbuilder-buildpackage.sh +++ b/pbuilder-buildpackage.sh @@ -1,7 +1,23 @@ -#!/bin/bash +#! /bin/bash export LANG=C export LC_ALL=C +function copydsc () { + local DSCFILE=$1 + local TARGET=$2 + cp $(echo $DSCFILE | sed 's/^\(.*\)\.dsc$/\1/' ).diff.gz \ + $(echo $DSCFILE | sed 's/^\(.*\)\.dsc$/\1/').tar.gz \ + $(echo $DSCFILE | sed 's/\(.*\)-[^-.]*\.dsc$/\1/').orig.tar.gz \ + $TARGET +} + +function checkbuilddep () { + ( + cd $BUILDPLACE/tmp/buildd/*/ + $CHROOTEXEC usr/bin/apt-get -y install $(dpkg-checkbuilddeps 2>&1 | sed 's/^.*: \(.*\)$/\1/' | awk 'BEGIN{RS=", "} /^([^([]*)/{print $1}') + ) +} + PACKAGENAME=$1 . /etc/pbuilderrc CHROOTEXEC="chroot $BUILDPLACE " @@ -14,9 +30,14 @@ mkdir -p $BUILDPLACE cd $BUILDPLACE tar xfzp $BASETGZ mkdir -p $BUILDPLACE/tmp/buildd - -echo Installing the build-deps and building -$CHROOTEXEC /bin/sh -c "(cd tmp/buildd; apt-get -y build-dep $PACKAGENAME ; apt-get -y source --build $PACKAGENAME || rm /tmp/buildd/* )" +echo Copying source file +copydsc $PACKAGENAME $BUILDPLACE/tmp/buildd +echo Extracting source +$CHROOTEXEC /usr/bin/dpkg-source -x $(basename $PACKAGENAME) +echo Installing the build-deps +checkbuilddep +echo Building the package +$CHROOTEXEC /bin/sh -c "(cd tmp/buildd/*/; dpkg-buildpackage)" echo Installing $BUILDPLACE/tmp/buildd/* to archive mkdir -p $MYREPOSITORYEXTRAPATH cp $BUILDPLACE/tmp/buildd/* $MYREPOSITORYEXTRAPATH |