aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-05-29 12:29:05 +0200
committerDave Barach <openvpp@barachs.net>2017-05-29 13:35:46 +0000
commit9b6463d72d1cff53476d465ce1a16be9c4b4b5c0 (patch)
treef045aefd0137906e68553e7f406437cebcacfe5d
parent142d151f075a73706f914451bceef18f4f07c28f (diff)
Add Debian Jessie support in toplevel makefile
Change-Id: I805800503f5330c14d2e654c02bf43e21e7ce917 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index aa15731f..946a8583 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,9 @@ DEB_DEPENDS += lcov chrpath autoconf nasm indent
DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6
ifeq ($(OS_VERSION_ID),14.04)
DEB_DEPENDS += openjdk-8-jdk-headless
+else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
+ DEB_DEPENDS += openjdk-8-jdk-headless
+ APT_ARGS = -t jessie-backports
else
DEB_DEPENDS += default-jdk-headless
endif
@@ -147,7 +150,7 @@ $(BR)/.bootstrap.ok:
ifeq ($(findstring y,$(UNATTENDED)),y)
make install-dep
endif
-ifeq ($(OS_ID),ubuntu)
+ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
@MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
if [ -n "$$MISSING" ] ; then \
echo "\nPlease install missing packages: \n$$MISSING\n" ; \
@@ -191,20 +194,24 @@ endif
bootstrap: $(BR)/.bootstrap.ok
install-dep:
-ifeq ($(OS_ID),ubuntu)
+ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
ifeq ($(OS_VERSION_ID),14.04)
@sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common
@sudo -E add-apt-repository ppa:openjdk-r/ppa $(CONFIRM)
endif
+ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
+ @grep -q jessie-backports /etc/apt/sources.list /etc/apt/sources.list.d/* 2> /dev/null \
+ || ( echo "Please install jessie-backports" ; exit 1 )
+endif
@sudo -E apt-get update
- @sudo -E apt-get $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
+ @sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E yum install $(CONFIRM) --enablerepo=epel $(EPEL_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs zlib
else
- $(error "This option currently works only on Ubuntu or Centos systems")
+ $(error "This option currently works only on Ubuntu, Debian or Centos systems")
endif
define make