ci: Updating Jenkins-CI and Travis-CI scripts

This commit makes use of has function from `util.sh` script, enables
dependency installation for Jenkins-CI, and unifies dependency
installation between Jenkins-CI and Travis-CI.

Change-Id: I5f4419ea48d4eb333e9d107115ef3df4123f76e5
Refs: #2805
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
new file mode 100755
index 0000000..c32219b
--- /dev/null
+++ b/.jenkins.d/00-deps.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+set -e
+
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
+
+if has OSX $NODE_LABELS; then
+    if has OSX-10.8 $NODE_LABELS; then
+        EXTRA_FLAGS=--c++11
+    fi
+
+    set -x
+    brew update
+    brew upgrade
+    brew install boost pkg-config cryptopp $EXTRA_FLAGS
+    brew cleanup
+fi
+
+if has Ubuntu $NODE_LABELS; then
+    BOOST_PKG=libboost-all-dev
+    if has Ubuntu-12.04 $NODE_LABELS; then
+        BOOST_PKG=libboost1.48-all-dev
+    fi
+
+    set -x
+    sudo apt-get update -qq -y
+    sudo apt-get -qq -y install build-essential pkg-config $BOOST_PKG \
+                                libcrypto++-dev libsqlite3-dev
+fi