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

Jenkins2 asteriskteam at digium.com
Thu Mar 15 06:45:00 CDT 2018


Jenkins2 has submitted this change and it was merged. ( 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(-)

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/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 1270349..dae8dee 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_NBSD="gmake pkg-config"
 # Asterisk: basic requirements:
 PACKAGES_NBSD="$PACKAGES_NBSD editline jansson sqlite3 libuuid libxml2"
@@ -165,6 +181,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
@@ -205,6 +230,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
 }
 
@@ -284,10 +316,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
@@ -302,6 +330,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" = 'NetBSD' ]; then
 	handle_nbsd
 elif [ "$OS" = 'OpenBSD' ]; 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: merged
Gerrit-Change-Id: I4cafc8973349d50a7cb7919ddf0bb1aaef4bfc3e
Gerrit-Change-Number: 8509
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.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/20180315/a1b2516e/attachment.html>


More information about the asterisk-code-review mailing list