From 4dc59c4acdf91a3499c1791456477897a1d56fd4 Mon Sep 17 00:00:00 2001
From: Albert Graef <aggraef@gmail.com>
Date: Thu, 8 Mar 2018 07:52:39 +0100
Subject: [PATCH] More installer bugfixes, prevent error messages when the
 Debian packaging tools are not available.

---
 l2ork_addons/tar_em_up.sh    | 4 ++++
 packages/linux_make/Makefile | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/l2ork_addons/tar_em_up.sh b/l2ork_addons/tar_em_up.sh
index bd1298cf8..744dc9b04 100755
--- a/l2ork_addons/tar_em_up.sh
+++ b/l2ork_addons/tar_em_up.sh
@@ -106,6 +106,10 @@ if [[ $os == "darwin" ]]; then
 	os=osx
 fi
 
+# Automagically disable Debian packaging when the Debian packaging tools are
+# not available.
+test $deb -eq 0 || test -x /usr/bin/dpkg-deb || pkg=0
+
 # XXXTODO: If no build target has been set, we should pick one by default.
 
 # Fetch the nw.js binary if we haven't already. We want to fetch it even
diff --git a/packages/linux_make/Makefile b/packages/linux_make/Makefile
index e19036680..86f62d8ef 100644
--- a/packages/linux_make/Makefile
+++ b/packages/linux_make/Makefile
@@ -141,7 +141,9 @@ debstage: $(bindir)
 # Pd-related scripts
 	#install -p $(scripts_src)/pd-diff $(DESTDIR)$(bindir)
 
+ifeq ($(PACKAGE_TYPE),deb)
 deb: DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+endif
 deb: DEB_PD_VERSION := $(shell echo $(PD_VERSION) | sed 's|\(.*\)-l2ork-\(.*\)|\1-\2|')
 deb: debstage
 # delete these since they are provided by the 'puredata-utils' and 'cyclist' package
-- 
GitLab