#!/bin/sh
case "$1" in
		lenny)
echo "building a deb package for Debian Lenny & Sid"
patch -p1 -i debian.patch
fakeroot debian/rules binary
patch -R -p1 -i debian.patch
fakeroot debian/rules clean
;;
		ubuntu)
echo "building a deb package for Ubuntu Hardy Heron"
patch -p1 -i debian.patch
patch -p1 -i ubuntu.patch
fakeroot debian/rules binary
patch -R -p1 -i debian.patch
patch -R -p1 -i ubuntu.patch
fakeroot debian/rules clean
;;
		*)
echo "Usage: $0 {lenny|ubuntu}"
exit 1
esac
