# It's a bit hacky, but it works around the fact that debian thinks it s a good idea to put the package results in the parent directory
rm -rf dist mkdir -p dist/debian tar --transform 's,^\./,cloudstack-4.1.0-incubating/,' -c -z -f dist/debian/cloudstack-4.1.0-SNAPSHOT.tgz --exclude .git --exclude dist . ( cd dist/debian tar -xzf cloudstack-4.1.0-SNAPSHOT.tgz (cd cloudstack-4.1.0-incubating ; dpkg-buildpackage ) )