3
VERSION=`python -c "from recent_notifications.Globals import VERSION; print VERSION"`
4
NAME="recent-notifications-${VERSION}"
6
ORIG="recent-notifications_${VERSION}.orig.tar.gz"
8
# Get command line arguments
14
echo "usage: build-package.sh [options]"
17
echo "-b, --binary only build an unsigned binary package"
18
echo "-c, --clean delete everything in the dist directory"
19
echo "-h, --help print this help message and exit"
26
"-b" | "--binary") BUILD_BINARY=1;;
27
"-c" | "--clean" ) CLEAN=1;;
28
"-h" | "--help" ) PRINT_HELP=1;;
32
# Print the usage and exit
33
if [ "${PRINT_HELP}" -eq "1" ]
39
# Clean the dist directory
40
if [ "${CLEAN}" -eq "1" ]
42
echo "Cleaning the dist directory"
48
echo "Building source distribution for ${SDIST}"
53
rm -rf "${NAME}/debian"
54
tar czf "deb/${ORIG}" "${NAME}"
57
echo "Unpacking source distribution in deb directory"
61
export DEBUILD_LINTIAN=yes
62
export DEBUILD_LINTIAN_OPTS="-i -I --show-overrides"
64
echo "Building deb package"
65
if [ "${BUILD_BINARY}" -eq "1" ]
67
dpkg-buildpackage -us -uc
69
# Build the lucid source package
72
# Update the changelog for lucid
73
sed -i -e 's/lucid/maverick/g' debian/changelog
74
# Build the maverick source package