Fix $(SUSE_NAME) in Makefile. 17/17917/3
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Wed, 27 Feb 2019 19:15:04 +0000 (11:15 -0800)
committerDave Wallace <dwallacelf@gmail.com>
Wed, 8 May 2019 01:37:59 +0000 (01:37 +0000)
SUSE_NAME is now lowercase with dashes in place of spaces.

grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | sed -e 's/ /-/' | awk '{print tolower($0)}'
opensuse-leap

Change-Id: Ie547c2e5684f955529a010d14b9317bbbde4caf6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Makefile

index d8b347c..f5f7ee6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -111,8 +111,8 @@ endif
 # +ganglia-devel if building the ganglia plugin
 
 RPM_DEPENDS += chrpath libffi-devel rpm-build
-
-SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
+# lowercase- replace spaces with dashes.
+SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | sed -e 's/ /-/' | awk '{print tolower($$0)}')
 SUSE_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
 RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
 RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python3-ply
@@ -126,7 +126,7 @@ RPM_SUSE_PYTHON_DEPS += python-rpm-macros python3-rpm-macros
 RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build
 
 ifeq ($(OS_ID),opensuse)
-ifeq ($(SUSE_NAME),Tumbleweed)
+ifeq ($(SUSE_NAME),tumbleweed)
        RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0  libboost_thread1_68_0-devel-1.68.0 gcc
        RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
 endif