Updated some comments.
[zeroinstall.git] / makedeb
blob0581de15cafe872ecc835a8fb29ea658dfcb05a1
1 #!/bin/sh
2 if [ "$1" = "" ]; then
3 echo Usage: makedeb source.tgz
4 exit 1
5 fi
7 orig=`basename $1 | sed 's/-\([0-9]\)/_\1/' | sed 's/.tar.gz$/.orig.tar.gz/'`
9 echo "Copying $1 as $orig..."
11 rm -rf build-deb
12 mkdir build-deb || exit 1
13 cp "$1" build-deb/"$orig" || exit 1
15 cd build-deb || exit 1
16 tar xzf "$orig" || exit 1
18 name=`basename $1 | sed 's/.tar.gz$//'`
19 cd "$name" || exit 1
21 (cd ../.. && svn export debian build-deb/$name/debian) || exit 1
23 if [ "$2" = "--test" ]; then
24 dpkg-buildpackage -kTesting -rfakeroot
25 else
26 dpkg-buildpackage -k59A53CC1 -rfakeroot
29 echo Running lintian...
30 lintian -i ../*.changes