[Asterisk-code-review] install prereq: Add SUSE. (asterisk[master])

Alexander Traud asteriskteam at digium.com
Mon Mar 12 08:06:36 CDT 2018


Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/8509


Change subject: install_prereq: Add SUSE.
......................................................................

install_prereq: Add SUSE.

ASTERISK-27736

Change-Id: I4cafc8973349d50a7cb7919ddf0bb1aaef4bfc3e
---
M contrib/scripts/install_prereq
1 file changed, 36 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/09/8509/1

diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 23a247a..66c3724 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -51,6 +51,22 @@
 PACKAGES_RH="$PACKAGES_RH bzip2 patch python-devel"
 
 # Basic build system:
+PACKAGES_SUSE="make gcc gcc-c++ pkg-config"
+# Asterisk: basic requirements:
+PACKAGES_SUSE="$PACKAGES_SUSE libedit-devel libjansson-devel libuuid-devel sqlite3-devel libxml2-devel"
+# Asterisk: for addons:
+PACKAGES_SUSE="$PACKAGES_SUSE speex-devel speexdsp-devel libogg-devel libvorbis-devel alsa-devel portaudio-devel libcurl-devel xmlstarlet bison flex"
+PACKAGES_SUSE="$PACKAGES_SUSE postgresql-devel unixODBC-devel libtool libneon-devel gmime-devel lua-devel liburiparser-devel libxslt-devel libopenssl-devel"
+PACKAGES_SUSE="$PACKAGES_SUSE libmysqlclient-devel bluez-devel freeradius-client-devel freetds-devel bash"
+PACKAGES_SUSE="$PACKAGES_SUSE net-snmp-devel iksemel-devel libcorosync-devel newt-devel popt-devel libical-devel spandsp-devel"
+PACKAGES_SUSE="$PACKAGES_SUSE imap-devel libsrtp2-devel libgsm-devel doxygen graphviz zlib-devel openldap2-devel"
+PACKAGES_SUSE="$PACKAGES_SUSE codec2-devel fftw3-devel libsndfile-devel unbound-devel"
+# Asterisk: for the unpackaged below:
+PACKAGES_SUSE="$PACKAGES_SUSE wget subversion"
+# Asterisk: for ./configure --with-pjproject-bundled:
+PACKAGES_SUSE="$PACKAGES_SUSE bzip2 patch python-devel"
+
+# Basic build system:
 PACKAGES_OBSD="gmake"
 # Asterisk: basic requirements:
 PACKAGES_OBSD="$PACKAGES_OBSD libxml sqlite3 e2fsprogs jansson"
@@ -148,6 +164,15 @@
 	done
 }
 
+check_installed_zypper() {
+	for pack in "$@"
+	do
+		if ! zypper se -ixnC $pack >/dev/null 2>/dev/null
+		then echo $pack
+		fi
+	done
+}
+
 handle_debian() {
 	if ! [ -x "$(command -v aptitude)" ]; then
 		apt-get install aptitude
@@ -177,6 +202,13 @@
 	extra_packs=`check_installed_fpkgs $PACKAGES_FBSD`
 	if [ x"$extra_packs" != "x" ] ; then
 		$testcmd pkg install -y $extra_packs
+	fi
+}
+
+handle_SUSE() {
+	extra_packs=`check_installed_zypper $PACKAGES_SUSE`
+	if [ x"$extra_packs" != "x" ] ; then
+		$testcmd zypper install --no-confirm $extra_packs
 	fi
 }
 
@@ -256,10 +288,6 @@
 	unsupported_distro='Mandriva'
 fi
 
-if [ -f /etc/SuSE-release ]; then
-	unsupported_distro='SUSE'
-fi
-
 if [ -f /etc/slackware-version ]; then
 	unsupported_distro='Slackware'
 fi
@@ -274,6 +302,10 @@
 	handle_debian
 elif [ -r /etc/redhat-release ]; then
 	handle_rh
+elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then
+	handle_SUSE
+elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "opensuse" ]; then
+	handle_SUSE
 elif [ "$OS" = 'OpenBSD' ]; then
 	handle_obsd
 elif [ "$OS" = 'FreeBSD' ]; then

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cafc8973349d50a7cb7919ddf0bb1aaef4bfc3e
Gerrit-Change-Number: 8509
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180312/feed169a/attachment.html>


More information about the asterisk-code-review mailing list