summaryrefslogtreecommitdiffstats
path: root/packaging/deb/debuild.sh
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-08-22 12:59:37 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-08-22 14:28:54 +0000
commit2fd5a0aa10b737a471478f43c3fc0b0a0d1374db (patch)
tree32a899af82dbf621af569b8fa1401277f602044b /packaging/deb/debuild.sh
parentf8bb88dac590165a9909b6e60e6c06b435a2d456 (diff)
Honeycomb deb packaging
Change-Id: I6f029ef9236cbd3f7f20fd8e44f83b15cdedc5db Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'packaging/deb/debuild.sh')
-rwxr-xr-xpackaging/deb/debuild.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/packaging/deb/debuild.sh b/packaging/deb/debuild.sh
new file mode 100755
index 000000000..95327fa35
--- /dev/null
+++ b/packaging/deb/debuild.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -xe
+DIR=$(dirname $0)
+DIR=$(readlink -f $DIR)
+VERSION=$(${DIR}/../rpm/version)
+RELEASE=$(${DIR}/../rpm/release)
+PACKAGING_ROOT=${DIR}/honeycomb-${VERSION}
+
+# Copy and unpack the archive with vpp-integration distribution
+ARCHIVE_DIR=${DIR}/../../vpp-integration/minimal-distribution/target/
+ARCHIVE=${ARCHIVE_DIR}/vpp-integration-distribution-1.0.0-SNAPSHOT-hc.tar.gz
+cp ${ARCHIVE} ${DIR}
+ARCHIVE=${DIR}/vpp-integration-distribution-${VERSION}-SNAPSHOT-hc.tar.gz
+tar -xf ${ARCHIVE} -C ${DIR}/
+
+# Create packaging root
+rm -rf ${PACKAGING_ROOT}
+mkdir ${PACKAGING_ROOT}
+
+# Copy contents of tar.gz
+mv ${DIR}/vpp-integration-distribution-${VERSION}-SNAPSHOT/ ${PACKAGING_ROOT}/
+cp -r ${DIR}/debian/ ${PACKAGING_ROOT}
+
+# Upstart configuration
+cp ${DIR}/honeycomb.conf ${PACKAGING_ROOT}
+
+# Changelog file
+cat <<EOT >> ${PACKAGING_ROOT}/debian/changelog
+honeycomb (${VERSION}-${RELEASE}) unstable; urgency=low
+
+ * Initial release
+
+ -- mmarsale <mmarsale@cisco.com> Mon, 22 Aug 2016 09:41:37 +0200
+EOT
+
+# Install instructions
+cat <<EOT >> ${PACKAGING_ROOT}/debian/install
+vpp-integration-distribution-${VERSION}-SNAPSHOT/* /opt/honeycomb/
+honeycomb.conf /etc/init/
+EOT
+
+# Build deb binary only package
+cd ${PACKAGING_ROOT}
+dpkg-buildpackage -b
+cd - \ No newline at end of file