2011-03-29 00:52:22 +02:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2011-12-28 14:24:10 +01:00
|
|
|
REFSPEC=$1
|
2011-03-29 00:52:22 +02:00
|
|
|
DIST=$2
|
|
|
|
|
2011-12-28 14:24:10 +01:00
|
|
|
if [ -z "$REFSPEC" -o -z "$DIST" ]; then
|
|
|
|
echo "Usage: $0 <refspec> <dist>"
|
2011-03-29 00:52:22 +02:00
|
|
|
echo "Example: $0 tags/0.7 natty"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
PPA=ppa:me-davidsansome/clementine
|
2011-12-28 14:24:10 +01:00
|
|
|
REPO=https://code.google.com/p/clementine-player/
|
2011-03-29 00:52:22 +02:00
|
|
|
|
|
|
|
BASE=`pwd`
|
|
|
|
DIRECTORY=clementine
|
|
|
|
|
|
|
|
# Cleanup any old stuff
|
|
|
|
rm -rfv $BASE/$DIRECTORY $BASE/*.diff.gz $BASE/*.tar.gz $BASE/*.dsc $BASE/*_source.changes
|
|
|
|
|
|
|
|
# Checkout
|
2011-12-28 14:24:10 +01:00
|
|
|
git init $DIRECTORY
|
|
|
|
cd $BASE/$DIRECTORY
|
|
|
|
git fetch -t $REPO $REFSPEC
|
|
|
|
git checkout $REFSPEC
|
2011-03-29 00:52:22 +02:00
|
|
|
|
|
|
|
# Generate changelog and maketarball.sh
|
2011-12-28 14:24:10 +01:00
|
|
|
mkdir $BASE/$DIRECTORY/bin
|
2011-03-29 00:52:22 +02:00
|
|
|
cd $BASE/$DIRECTORY/bin
|
|
|
|
cmake .. -DDEB_DIST=$DIST -DWITH_DEBIAN=ON
|
|
|
|
rm -rfv $BASE/$DIRECTORY/bin/*
|
|
|
|
|
|
|
|
# Create the tarball
|
|
|
|
cd $BASE/$DIRECTORY/dist
|
|
|
|
./maketarball.sh
|
|
|
|
mv -v $BASE/$DIRECTORY/dist/*.orig.tar.gz $BASE/
|
|
|
|
rm -v $BASE/$DIRECTORY/dist/*.tar.gz
|
2011-12-28 14:24:10 +01:00
|
|
|
rm -vrf $BASE/$DIRECTORY/.git
|
2011-03-29 00:52:22 +02:00
|
|
|
|
|
|
|
# Build the deb
|
|
|
|
cd $BASE/$DIRECTORY
|
|
|
|
dpkg-buildpackage -S -kF6ABD82E
|
|
|
|
|
|
|
|
# Upload to ppa
|
|
|
|
cd $BASE
|
|
|
|
dput $PPA *_source.changes
|