Support to install dependencies on openSUSE distribution 73/6973/2
authorMarco Varlese <marco.varlese@suse.com>
Thu, 1 Jun 2017 13:20:15 +0000 (15:20 +0200)
committerDamjan Marion <dmarion.lists@gmail.com>
Thu, 1 Jun 2017 17:16:11 +0000 (17:16 +0000)
This patch allows to use the "make install-dep" on openSUSE.

Change-Id: Ib0586ffebbf882032468e4f4c0df2d5d8e99d7c9
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Makefile

index 946a858..1b51d8f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ endif
 
 ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
 PKG=deb
-else ifeq ($(filter rhel centos fedora,$(OS_ID)),$(OS_ID))
+else ifeq ($(filter rhel centos fedora opensuse,$(OS_ID)),$(OS_ID))
 PKG=rpm
 endif
 
@@ -69,6 +69,10 @@ else
        RPM_DEPENDS += lcov
 endif
 
+RPM_SUSE_DEPENDS = autoconf automake bison ccache chrpath distribution-release gcc6 glibc-devel-static
+RPM_SUSE_DEPENDS += java-1_8_0-openjdk-devel libopenssl-devel libtool lsb-release make openssl-devel
+RPM_SUSE_DEPENDS += python-devel python-pip python-rpm-macros shadow
+
 ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
         STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
 endif
@@ -210,6 +214,8 @@ else ifneq ("$(wildcard /etc/redhat-release)","")
        @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 ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
+       @sudo -E zypper -n install -y $(RPM_SUSE_DEPENDS)
 else
        $(error "This option currently works only on Ubuntu, Debian or Centos systems")
 endif