[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

tools: Changes to 'master'



 blingbuilder.sh |   38 ++++++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)

New commits:
commit 8594d6967e9e9a83b725fd33f352817720eb970e
Author: Sean Finney <seanius@debian.org>
Date:   Sun Apr 12 20:04:22 2009 +0200

    further fixes/improvements/modifications

diff --git a/blingbuilder.sh b/blingbuilder.sh
index ed04a63..77ff452 100755
--- a/blingbuilder.sh
+++ b/blingbuilder.sh
@@ -7,14 +7,28 @@
 # does some other quite sketchy things so i suggest you only run this script
 # after you read and understand what it does!
 
-set -e
-set -u
-set -x
+set -eu
 
-packages="compiz libcompizconfig compiz-fusion-bcop
+packages() {
+  case "$1" in
+  lenny-backports)
+    echo "compiz libcompizconfig compiz-fusion-bcop
+          compizconfig-backend-gconf compizconfig-backend-kconfig
+          compiz-fusion-plugins-main compiz-fusion-plugins-extra
+          compiz-fusion-plugins-unsupported compizconfig-python ccsm"
+  ;;
+  *)
+    echo "compiz libcompizconfig compiz-fusion-bcop
           compizconfig-backend-gconf compizconfig-backend-kconfig4
           compiz-fusion-plugins-main compiz-fusion-plugins-extra
           compiz-fusion-plugins-unsupported compizconfig-python ccsm"
+  ;;
+  esac
+}
+
+pkglist="`packages $1`"
+defbranch="$2"
+shift 2
 
 repo(){
   case "$1" in
@@ -49,7 +63,7 @@ root(){
 
 echo here i am rock you like a hurricane
 # step 0: install dependencies, variable settings etc
-root apt-get install git-core git-buildpackage
+root apt-get -q -y install git-core git-buildpackage dput fakeroot
 
 workdir=`mktemp -d`
 src="$workdir/src"
@@ -72,12 +86,19 @@ EOF
 # step 1: build a source package for each package from git
 #         this is needed so we can do build-dependencies properly.
 echo deb-src "file://$srcstage" ./ > $workdir/deb-src
+echo deb "file://$binstage" ./ > $workdir/deb-src
+echo deb-src http://ftp.se.debian.org/debian/ lenny main >> $workdir/deb-src
+touch $srcstage/Sources
+touch $binstage/Packages
 root mv $workdir/deb-src /etc/apt/sources.list.d/blingbuilder.list
 
 cd "$src"
-for pkg in $packages; do
+for pkg in $pkglist; do
+  root apt-get -q update
+  root apt-get -q --allow-unauthenticated -y build-dep $pkg
   git clone `repo $pkg`
   ( cd $pkg && 
+    git checkout -b $defbranch origin/$defbranch
     debbranch=`git config -f debian/gbp.conf --get DEFAULT.debian-branch`
     usbranch=`git config -f debian/gbp.conf --get DEFAULT.upstream-branch`
     ( git branch | grep -q $usbranch ||
@@ -89,10 +110,11 @@ for pkg in $packages; do
   dput -c $workdir/dput.cf stage-src `srcpkg ${pkg}`_*.changes
   ( cd "$srcstage" && dpkg-scansources . > Sources )
   find $src -maxdepth 1 -mindepth 1 -type f | xargs rm
-  root apt-get update
-  root apt-get build-dep `srcpkg $pkg`
+  root apt-get -q update
+  root apt-get -q --allow-unauthenticated -y build-dep `srcpkg $pkg`
   ( cd $pkg && git-buildpackage )
   dput -c $workdir/dput.cf stage-bin `srcpkg ${pkg}`_*.changes
+  ( cd "$binstage" && dpkg-scanpackages . > Packages )
   find $src -maxdepth 1 -mindepth 1 -type f | xargs rm
 done
 


Reply to: