[Asterisk-code-review] install prereq: Add Slackware (somehow). (asterisk[13])

Jenkins2 asteriskteam at digium.com
Tue Apr 3 06:14:27 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8648 )

Change subject: install_prereq: Add Slackware (somehow).
......................................................................

install_prereq: Add Slackware (somehow).

ASTERISK-27770

Change-Id: Ib87e0483c785542238cfe34c1e884d5a31edfaab
---
M Makefile
M contrib/scripts/install_prereq
2 files changed, 22 insertions(+), 6 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/Makefile b/Makefile
index ff38fa8..48b794f 100644
--- a/Makefile
+++ b/Makefile
@@ -952,6 +952,10 @@
 		fi ; \
 	elif [ -f /etc/arch-release -o -f /etc/arch-release ] ; then \
 		./build_tools/install_subst contrib/init.d/rc.archlinux.asterisk  "$(DESTDIR)/etc/init.d/asterisk"; \
+	elif [ -f /etc/slackware-version ]; then \
+		./build_tools/install_subst contrib/init.d/rc.slackware.asterisk  "$(DESTDIR)/etc/rc.d/rc.asterisk"; \
+	elif [ -f /etc/os-release ] && [ "slackware" = "$(shell . /etc/os-release && echo $$ID)" ] ; then \
+		./build_tools/install_subst contrib/init.d/rc.slackware.asterisk  "$(DESTDIR)/etc/rc.d/rc.asterisk"; \
 	elif [ -d "$(DESTDIR)/Library/LaunchDaemons" ]; then \
 		if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist" ]; then \
 			./build_tools/install_subst contrib/init.d/org.asterisk.asterisk.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist"; \
@@ -959,8 +963,6 @@
 		if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist" ]; then \
 			./build_tools/install_subst contrib/init.d/org.asterisk.muted.plist "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.muted.plist"; \
 		fi; \
-	elif [ -f /etc/slackware-version ]; then \
-		echo "Slackware is not currently supported, although an init script does exist for it."; \
 	else \
 		echo "We could not install init scripts for your distribution." ; \
 	fi
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index f01b332..496bf2a 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -290,7 +290,11 @@
 		./configure
 		make all install
 		cd ..
-		echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
+		if test -d /etc/ld.so.conf.d; then
+			echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
+		else # for example: Slackware 14.2
+			echo "/usr/local/lib" > /etc/ld.so.conf
+		fi
 		/sbin/ldconfig
 	fi
 
@@ -303,7 +307,11 @@
 			./configure --enable-openssl
 			make shared_library install
 			cd ..
-			echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
+			if test -d /etc/ld.so.conf.d; then
+				echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
+			else # for example: Slackware 14.2
+				echo "/usr/local/lib" > /etc/ld.so.conf
+			fi
 			/sbin/ldconfig
 		fi
 	fi
@@ -341,8 +349,14 @@
 	unsupported_distro='Mandriva'
 fi
 
-if [ -f /etc/slackware-version ]; then
-	unsupported_distro='Slackware'
+if [ -f /etc/slackware-version ] || ([ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "slackware" ]); then
+	echo >&2 "$0: Your distribution (Slackware) is currently not supported. Aborting. Try manually:"
+	# libedit requires a newer version than Slackware 14.2, for example Slackware-current
+	# or you build it manually: <http://thrysoee.dk/editline/>
+	echo >&2 "$0: # slackpkg install make gcc pkg-config libedit util-linux sqlite libxml2 patch wget"
+	# required for libjansson
+	echo >&2 "$0: # ./contrib/scripts/install_prereq install-unpackaged"
+	exit 1
 fi
 
 if [ "$unsupported_distro" != '' ]; then

-- 
To view, visit https://gerrit.asterisk.org/8648
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib87e0483c785542238cfe34c1e884d5a31edfaab
Gerrit-Change-Number: 8648
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180403/2735f01c/attachment-0001.html>


More information about the asterisk-code-review mailing list