[Asterisk-code-review] install prereq: Add Arch Linux. (asterisk[15])

Alexander Traud asteriskteam at digium.com
Mon Mar 12 10:22:19 CDT 2018


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


Change subject: install_prereq: Add Arch Linux.
......................................................................

install_prereq: Add Arch Linux.

ASTERISK-27738

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



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/13/8513/1

diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 23a247a..dfdb2e6 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_ARCH="make gcc pkg-config"
+# Asterisk: basic requirements:
+PACKAGES_ARCH="$PACKAGES_ARCH libedit jansson libutil-linux libxml2 sqlite"
+# Asterisk: for addons:
+PACKAGES_ARCH="$PACKAGES_ARCH speex speexdsp libogg libvorbis alsa-lib portaudio curl xmlstarlet bison flex"
+PACKAGES_ARCH="$PACKAGES_ARCH postgresql-libs unixodbc libtool neon gmime lua uriparser libxslt openssl"
+PACKAGES_ARCH="$PACKAGES_ARCH libmariadbclient bluez-libs radcli freetds bash"
+PACKAGES_ARCH="$PACKAGES_ARCH net-snmp libnewt popt libical spandsp"
+PACKAGES_ARCH="$PACKAGES_ARCH c-client binutils libsrtp gsm doxygen graphviz zlib libldap"
+PACKAGES_ARCH="$PACKAGES_ARCH fftw libsndfile unbound"
+# Asterisk: for the unpackaged below:
+PACKAGES_ARCH="$PACKAGES_ARCH wget subversion"
+# Asterisk: for ./configure --with-pjproject-bundled:
+PACKAGES_ARCH="$PACKAGES_ARCH bzip2 patch python2"
+
+# Basic build system:
 PACKAGES_OBSD="gmake"
 # Asterisk: basic requirements:
 PACKAGES_OBSD="$PACKAGES_OBSD libxml sqlite3 e2fsprogs jansson"
@@ -130,6 +146,15 @@
 	done
 }
 
+check_installed_pacman() {
+	for pack in "$@"
+	do
+		if ! pacman -Q --explicit $pack >/dev/null 2>/dev/null
+		then echo $pack
+		fi
+	done
+}
+
 check_installed_pkgs() {
 	for pack in "$@"
 	do
@@ -163,6 +188,13 @@
 	extra_packs=`check_installed_rpms $PACKAGES_RH`
 	if [ x"$extra_packs" != "x" ] ; then
 		$testcmd yum install --skip-broken --assumeyes $extra_packs
+	fi
+}
+
+handle_arch() {
+	extra_packs=`check_installed_pacman $PACKAGES_ARCH`
+	if [ x"$extra_packs" != "x" ] ; then
+		$testcmd pacman -S --asexplicit --noconfirm $extra_packs
 	fi
 }
 
@@ -274,6 +306,10 @@
 	handle_debian
 elif [ -r /etc/redhat-release ]; then
 	handle_rh
+elif [ -r /etc/arch-release ]; then
+	handle_arch
+elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID_LIKE" = "archlinux" ]; then
+	handle_arch # $ID=arch
 elif [ "$OS" = 'OpenBSD' ]; then
 	handle_obsd
 elif [ "$OS" = 'FreeBSD' ]; then

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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ca620e3c4dfb4b064a19382c4915aeb42a2a09f
Gerrit-Change-Number: 8513
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/328a90e3/attachment-0001.html>


More information about the asterisk-code-review mailing list