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:32:37 +01:00
|
|
|
git clone $REPO $DIRECTORY
|
2011-12-28 14:24:10 +01:00
|
|
|
cd $BASE/$DIRECTORY
|
|
|
|
git checkout $REFSPEC
|
2011-12-28 14:32:37 +01:00
|
|
|
git cherry-pick -n 9e2e035ae1a25bc5f37a17ae7ea10ba7c37fb328
|
|
|
|
git cherry-pick -n 5b9a273227648919c8c57c73df9c980c049eccc4
|
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
|