[23043] in Source-Commits
/svn/athena r22706 - trunk/debathena/scripts
daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Fri Jan 25 12:56:45 2008
Date: Fri, 25 Jan 2008 12:56:34 -0500 (EST)
From: ghudson@MIT.EDU
Message-Id: <200801251756.MAA15189@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: ghudson
Date: 2008-01-25 12:56:33 -0500 (Fri, 25 Jan 2008)
New Revision: 22706
Modified:
trunk/debathena/scripts/dasource
Log:
* debathena/scripts/dasource: Build unsigned source packages. Handle
Debian version components by creating an original tarball without
the debian subdir. Add comments for clarity.
Modified: trunk/debathena/scripts/dasource
===================================================================
--- trunk/debathena/scripts/dasource 2008-01-25 05:15:48 UTC (rev 22705)
+++ trunk/debathena/scripts/dasource 2008-01-25 17:56:33 UTC (rev 22706)
@@ -42,6 +42,8 @@
echo "Creating directory $pkgname"
mkdir $pkgname
fi
+
+ # Check out or update the package source.
if [ $(echo $pkgname/$pkgname-* | wc -w) -gt 2 ]; then
die "More than one checkout under $pkgname!"
elif [ -d $pkgname/$pkgname-* ]; then
@@ -53,19 +55,30 @@
echo "Checking out $repo/$pkgpath into $dir"
svn co $repo/$pkgpath $dir
fi
+
+ # Extract the changelog version and strip off the epoch and Debian component.
changever=$(cd $dir && dpkg-parsechangelog | sed -n 's/Version: //p')
- upver=$(echo $changever | sed -r -e 's/^([0-9]+:)//' -e 's/-[^-]*$//')
- if [ $changever != $upver ]; then
- die "Version $changever has epoch or Debian version component!"
- fi
+ sver=$(echo $changever | sed -re 's/^[0-9]+://p')
+ upver=$(echo $sver | sed -re 's/-[^-]*$//')
+
+ # Rename the source checkout if necessary.
correctdir=$pkgname/${pkgname}-$upver
if [ $dir != $correctdir ]; then
echo "Renaming $dir to $correctdir"
mv $dir $correctdir
dir=$correctdir
fi
+
+ # Create an orig tarfile if the version has a Debian component.
+ if [ $sver != $upver ]; then
+ echo "Creating original source archive"
+ (cd $pkgname && tar --exclude=.svn --exclude=debian $correctname -czf \
+ ${pkgname}_$upver.orig.tar.gz ${pkgname}-$upver)
+ fi
+
+ # Build an unsigned package, ignoring version control subdirs in the source.
echo "Creating source package"
- (cd $dir && debuild -S -I.svn)
+ (cd $dir && debuild -S -i -I -sa -us -uc)
}
if [ $# -gt 0 ]; then