2015-10-24 17:14:56 +02:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
if [ ! -e dist/ubuntu/build_deb.sh ]; then
|
|
|
|
echo "run build_deb.sh in top of scylla dir"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-11-24 19:24:45 +01:00
|
|
|
if [ -e debian ] || [ -e build ] || [ -e target ] || [ -e m2 ] || [ -e dependency-reduced-pom.xml ]; then
|
|
|
|
rm -rf debian build target m2 dependency-reduced-pom.xml
|
2015-11-24 17:57:53 +01:00
|
|
|
fi
|
2015-10-24 17:14:56 +02:00
|
|
|
|
2015-11-06 21:10:51 +01:00
|
|
|
VERSION=$(./SCYLLA-VERSION-GEN)
|
2016-03-22 11:23:48 +01:00
|
|
|
SCYLLA_VERSION=$(cat build/SCYLLA-VERSION-FILE | sed 's/\.rc/~rc/')
|
2015-11-06 21:10:51 +01:00
|
|
|
SCYLLA_RELEASE=$(cat build/SCYLLA-RELEASE-FILE)
|
|
|
|
if [ "$SCYLLA_VERSION" = "development" ]; then
|
|
|
|
SCYLLA_VERSION=0development
|
|
|
|
fi
|
2015-11-24 17:57:53 +01:00
|
|
|
echo $VERSION > version
|
|
|
|
./scripts/git-archive-all --extra version --force-submodules --prefix scylla-jmx ../scylla-jmx_$SCYLLA_VERSION-$SCYLLA_RELEASE.orig.tar.gz
|
|
|
|
|
|
|
|
cp -a dist/ubuntu/debian debian
|
2015-11-06 21:10:51 +01:00
|
|
|
cp dist/ubuntu/changelog.in debian/changelog
|
|
|
|
sed -i -e "s/@@VERSION@@/$SCYLLA_VERSION/g" debian/changelog
|
|
|
|
sed -i -e "s/@@RELEASE@@/$SCYLLA_RELEASE/g" debian/changelog
|
|
|
|
|
2015-11-24 17:57:53 +01:00
|
|
|
sudo apt-get -y install debhelper maven openjdk-7-jdk devscripts
|
|
|
|
debuild -r fakeroot -us -uc
|