From c67a607fe2f2d67dc7b9a0e7257f65a8cb44373b Mon Sep 17 00:00:00 2001
From: Dilawar Singh <dilawars@ncbs.res.in>
Date: Tue, 13 Mar 2018 09:17:42 +0000
Subject: [PATCH] Fixes for Debian.

---
 cmake/build_moose-core.sh.in | 9 ++++++---
 moose-core/CMakeLists.txt    | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/cmake/build_moose-core.sh.in b/cmake/build_moose-core.sh.in
index 5e6530c5..b753f852 100755
--- a/cmake/build_moose-core.sh.in
+++ b/cmake/build_moose-core.sh.in
@@ -6,6 +6,9 @@ set -e
 # NOTICE: This file is parsed by cmake to create a shell script. Not all syntax
 # will play well with cmake. CMAKE replaces @FOO@ and ${FOO} with cmake variable
 # values.
+if [ -z $MAKEOPTS ]; then
+    export MAKEOPTS="-j5"
+fi
 
 echo "Building pymoose and creating bdist."
 export GSL_ROOT_DIR=@GSL_ROOT_DIR@
@@ -18,7 +21,7 @@ cmake -DCMAKE_INSTALL_PREFIX=@PYMOOSE_INSTALL_DIR@ \
     -DVERSION_MOOSE=@VERSION_MOOSE@ \
     @CMAKE_PYMOOSE_ARGS@ \
     @PYMOOSE_SOURCE_DIR@ 
+make $MAKEOPTS
+ctest --output-on-failure 
+make bdist
 
-make -j3
-ctest --output-on-failure || echo "Some tests failed"
-make bdist 
diff --git a/moose-core/CMakeLists.txt b/moose-core/CMakeLists.txt
index 20588f7a..5511dda2 100644
--- a/moose-core/CMakeLists.txt
+++ b/moose-core/CMakeLists.txt
@@ -401,7 +401,7 @@ set(EXTRA_ARGS "--prefix ${CMAKE_INSTALL_PREFIX} ${DISTUTILS_EXTRA_ARGS}")
 # On Debian/Ubuntu install using debian layout.
 # NOTE: Also create setup.cfg file which setup prefix and install-layout
 # suitable for DEBIAN systems.
-if(${_platform_desc} MATCHES ".*(Ubuntu|Debian).*")
+if(${_platform_desc} MATCHES ".*(Ubuntu|debian).*")
     list(APPEND EXTRA_ARGS "--install-layout=deb")
     file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/python/setup.cfg
          "[install]\nprefix=/usr\ninstall-layout=deb"
-- 
GitLab