--- contrib/scripts/install_prereq (Asterisk 15.20) +++ contrib/scripts/install_prereq (working copy) @@ -53,2 +53,18 @@ # 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" @@ -120,2 +136,11 @@ +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() { @@ -156,2 +181,9 @@ +handle_arch() { + extra_packs=`check_installed_pacman $PACKAGES_ARCH` + if [ x"$extra_packs" != "x" ] ; then + $testcmd pacman -S --asexplicit --noconfirm $extra_packs + fi +} + handle_obsd() { @@ -264,2 +296,6 @@ 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