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
|
2014-02-19 18:34:22 +01:00
|
|
|
REPO=https://github.com/clementine-player/Clementine
|
2011-03-29 00:52:22 +02:00
|
|
|
|
|
|
|
BASE=`pwd`
|
|
|
|
DIRECTORY=clementine
|
|
|
|
|
|
|
|
# Cleanup any old stuff
|
2015-12-13 05:52:30 +01:00
|
|
|
rm -rfv $BASE/$DIRECTORY $BASE/*.diff.*z $BASE/*.tar.*z $BASE/*.dsc $BASE/*_source.changes
|
2011-03-29 00:52:22 +02:00
|
|
|
|
|
|
|
# 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-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
|
2015-12-13 05:52:30 +01:00
|
|
|
mv -v $BASE/$DIRECTORY/dist/*.orig.tar.xz $BASE/
|
|
|
|
rm -v $BASE/$DIRECTORY/dist/*.tar.*z
|
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
|