Skip to content

Instantly share code, notes, and snippets.



Created May 23, 2017
What would you like to do?
Debian-pkg recipe for CloudStack
# Using docker container:
set -e
#apt-get install -y software-properties-common python-software-properties
#add-apt-repository -y ppa:openjdk-r/ppa
#apt-get update -y
#apt-get install -y git debhelper openjdk-7-jdk genisoimage python python-mysql.connector python-mysqldb python-setuptools maven lsb-release dh-systemd sshpass jq curl wget
export ROOT=$PWD
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
echo $0
cat .java-version || true
echo $PATH
java -version
javac -version
mvn -version
export VERSION=$(grep '^ <version>' pom.xml| cut -d'>' -f2 |cut -d'<' -f1)
export BASE_VERSION=$(echo $VERSION | awk -F . '{print $1"."$2}')
export ACS_BUILD_OPTS="-Dnoredist -Dnonoss"
git clone $LIBS
if [ "$BASE_VERSION" = "4.2" ]; then
cp -r $LIBS/*.jar $LIBS/awsapi-lib/ $LIBS/*.mar deps
cd $LIBS
bash -x
cd $ROOT
cp $LIBS/vhd-util scripts/vm/hypervisor/xenserver/
chmod +x scripts/vm/hypervisor/xenserver/vhd-util
echo "cloudstack (${VERSION}) unstable; urgency=low" > $ROOT/newchangelog
echo "" >> $ROOT/newchangelog
echo " * Update the version to ${PACKAGE_VERSION}" >> $ROOT/newchangelog
echo "" >> $ROOT/newchangelog
echo " -- Rohit Yadav <> $(date +'%a, %-d %b %Y %H:%m:%S +0530')" >> $ROOT/newchangelog
echo "" >> $ROOT/newchangelog
cat $ROOT/debian/changelog >> $ROOT/newchangelog
mv $ROOT/newchangelog $ROOT/debian/changelog
cd $ROOT
dpkg-buildpackage -uc -us -b
# Pkgs will be at $ROOT/../*deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment