summaryrefslogtreecommitdiffstats
path: root/packaging/deb/common
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-03-28 09:15:42 +0200
committerJan Srnicek <jsrnicek@cisco.com>2017-03-29 06:11:23 +0000
commit212774e6dc3e3f74b100ac4f66420146e8f2472c (patch)
treeafc76d6ced7d91199066760e1d356bde6ceed3df /packaging/deb/common
parent539dafd91d6c58400ff2623d85df28f40a11ffe5 (diff)
HC2VPP-102: allow to configure vpp dependencies in deb/rpm build scripts
Debian: VPP dependencies can be specified in deb/common/vpp_dependencies file, used to generated debian/control file. Can be verified with: dpkg -I honeycomb_package.deb Centos: VPP dependencies can be specified in rpmvpp_dependencies file, referenced in honeycomb.spec. Can be verified with: rpm -i honeycomb_package.rpm Change-Id: Ide4ff3888085f714467fa1c1543b24b3c1b9f14b Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'packaging/deb/common')
-rwxr-xr-xpackaging/deb/common/prepare.sh21
-rwxr-xr-xpackaging/deb/common/vpp_dependencies6
2 files changed, 27 insertions, 0 deletions
diff --git a/packaging/deb/common/prepare.sh b/packaging/deb/common/prepare.sh
index 571f30ada..69d535389 100755
--- a/packaging/deb/common/prepare.sh
+++ b/packaging/deb/common/prepare.sh
@@ -4,10 +4,13 @@ set -xe
# $2 - $1/debian - just configurable for reuse
# $3 - service definition file
# $4 - service definition target during install
+# $5 - build dependencies file
SOURCE_DIR=$1
VERSION=$(${SOURCE_DIR}/../../rpm/version)
RELEASE=$(${SOURCE_DIR}/../../rpm/release)
BUILD_DIR=${SOURCE_DIR}/honeycomb-${VERSION}
+VPP_DEPENDENCIES=$(${SOURCE_DIR}/../../deb/common/vpp_dependencies)
+BUILD_DEPENDENCIES=$($5)
# Copy and unpack the archive with vpp-integration distribution
ARCHIVE_DIR=${SOURCE_DIR}/../../../vpp-integration/minimal-distribution/target/
@@ -42,4 +45,22 @@ vpp-integration-distribution-${VERSION}-SNAPSHOT/* /opt/honeycomb/
$3 $4
EOT
+# Generate control file
+cat <<EOT >> ${BUILD_DIR}/debian/control
+Source: honeycomb
+Section: misc
+Priority: optional
+Maintainer: fd.io/hc2vpp <hc2vpp@lists.fd.io>
+Build-Depends: ${BUILD_DEPENDENCIES}
+Standards-Version: 3.9.6
+Homepage: https://wiki.fd.io/view/Hc2vpp
+Vcs-Browser: https://git.fd.io/cgit/hc2vpp/tree/
+
+Package: honeycomb
+Architecture: all
+Depends: ${VPP_DEPENDENCIES}, openjdk-8-jre-headless
+Suggests: vpp-nsh-plugin
+Description: Honeycomb agent for VPP
+EOT
+
echo ${BUILD_DIR} \ No newline at end of file
diff --git a/packaging/deb/common/vpp_dependencies b/packaging/deb/common/vpp_dependencies
new file mode 100755
index 000000000..8c1c21617
--- /dev/null
+++ b/packaging/deb/common/vpp_dependencies
@@ -0,0 +1,6 @@
+#!/bin/bash
+# defines vpp and vpp-plugins dependencies for debian packages
+# using range
+echo "vpp (>= 17.04), vpp (<< 17.07), vpp-plugins (>= 17.04), vpp-plugins (<< 17.07)"
+# or specific vpp version
+#echo "vpp (= 17.04-rc1), vpp-plugins (= 17.04-rc1)"