[PATCHv3,4/4] scripts: add builddeb to create deb packages

Message ID 1421761896-23612-5-git-send-email-anders.roxell@linaro.org
State New
Headers show

Commit Message

Anders Roxell Jan. 20, 2015, 1:51 p.m.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Steve McIntyre <steve.mcintyre@linaro.org>
---
 scripts/builddeb | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100755 scripts/builddeb

Patch

diff --git a/scripts/builddeb b/scripts/builddeb
new file mode 100755
index 0000000..2c8fb0e
--- /dev/null
+++ b/scripts/builddeb
@@ -0,0 +1,23 @@ 
+#!/bin/bash
+
+set -e
+
+ROOT_DIR=$(readlink -e $(dirname $0) | sed 's|/scripts||')
+version=$(echo $(${ROOT_DIR}/scripts/odp_version.sh))
+
+pushd ${ROOT_DIR}
+./bootstrap
+./configure
+make dist
+
+cp opendataplane-${version}.tar.gz opendataplane_${version}.orig.tar.gz
+tar xzf opendataplane_${version}.orig.tar.gz
+
+pushd ${ROOT_DIR}/opendataplane-${version}
+cp -r ${ROOT_DIR}/debian .
+
+debuild -us -uc
+popd
+popd
+
+## vim: set sw=4 sts=4 et foldmethod=syntax : ##