2008-07-24 17:52:58 +00:00
|
|
|
#!/bin/bash
|
2008-05-08 20:54:15 +00:00
|
|
|
# Accepts directories to build packages from on the commandline, but defaults
|
2008-07-24 17:52:58 +00:00
|
|
|
# to building: perl-xCAT and xCAT-client
|
|
|
|
|
|
|
|
major="2.1"
|
|
|
|
lintian="" # TODO: lintian fails currently
|
|
|
|
#lintian="--svn-lintian"
|
|
|
|
|
|
|
|
if [ "$1" = "-s" ]; then
|
|
|
|
shift
|
|
|
|
snap=true
|
|
|
|
date="$( date +'%F' )"
|
|
|
|
version="$major-snapshot-$( date +'%Y%m%d' )"
|
|
|
|
fi
|
2008-05-08 20:54:15 +00:00
|
|
|
|
2008-06-27 15:25:42 +00:00
|
|
|
packages="${@:-perl-xCAT xCAT-client}"
|
2008-05-08 20:54:15 +00:00
|
|
|
|
|
|
|
for pkg in $packages; do
|
|
|
|
mkdir -p debs/$pkg
|
2008-07-24 17:52:58 +00:00
|
|
|
echo "*** Building Debian package for $pkg."
|
2008-05-08 20:54:15 +00:00
|
|
|
cd $pkg
|
2008-07-24 17:52:58 +00:00
|
|
|
if $snap; then
|
|
|
|
debchange --distribution unstable --newversion $version "snapshot of $pkg from $date"
|
|
|
|
fi
|
|
|
|
svn-buildpackage --svn-ignore $lintian --svn-move-to=../debs/$pkg
|
2008-05-08 20:54:15 +00:00
|
|
|
cd -
|
|
|
|
done
|