add unfinished bmpImage implementation
[openc2e.git] / debian / ppabuild.sh
blob1ee5d040393c99a5aeb546407f37416b679324b4
1 #!/bin/zsh -e
2 # vim: set ft=zsh :
4 trunk='svn://ccdevnet.org/openc2e/trunk'
5 ppasuffix="ppa0"
6 #set -A suites hardy gutsy
7 set -A suites gutsy
9 rev=`svn info $trunk|grep '^Revision:'|sed 's/.*: //'`
10 tempdir=`mktemp -d`
12 pushd $tempdir
13 echo Building package in $tempdir...
14 checkout=openc2e-0.0svn$rev
16 svn export $trunk $checkout -r $rev
17 tar czvf openc2e_0.0svn$rev.orig.tar.gz $checkout
18 cp $checkout/debian/changelog $tempdir/changelog.orig
20 pushd $checkout/debian
21 cp -f $tempdir/changelog.orig changelog
22 debversion="0.0svn${rev}-1~${ppasuffix}"
23 debchange -v $debversion -D UNRELEASED -b "Automatic checkout of revision ${rev}"
24 cd ..
25 dpkg-buildpackage -sa -rfakeroot -S
26 popd
28 for suite in $suites; do
29 sed "s/SUITE/$suite/" < $tempdir/$checkout/debian/dput.cf > $tempdir/dput.cf
30 dput -c $tempdir/dput.cf ccdevnet-ppa openc2e_${debversion}_source.changes
31 done
33 rm -rf $tempdir