[asterisk-commits] mvanbaak: trunk r208886 - /trunk/contrib/scripts/install_prereq
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jul 26 09:00:56 CDT 2009
Author: mvanbaak
Date: Sun Jul 26 09:00:52 2009
New Revision: 208886
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=208886
Log:
add OpenBSD to the install_prereq script
Modified:
trunk/contrib/scripts/install_prereq
Modified: trunk/contrib/scripts/install_prereq
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/contrib/scripts/install_prereq?view=diff&rev=208886&r1=208885&r2=208886
==============================================================================
--- trunk/contrib/scripts/install_prereq (original)
+++ trunk/contrib/scripts/install_prereq Sun Jul 26 09:00:52 2009
@@ -32,6 +32,8 @@
PACKAGES_RH="gcc gcc-c++ ncurses-devel openssl-devel"
+PACKAGES_OBSD="popt gmake wget libxml libogg libvorbis curl iksemel spandsp speex iodbc freetds-0.63p1-msdblib mysql-client gmime sqlite sqlite3 jack"
+
KVERS=`uname -r`
case "$1" in
@@ -61,6 +63,15 @@
done
}
+check_installed_pkgs() {
+ for pack in "$@"
+ do
+ if [ `pkg_info -a | grep $pack | wc -l` = 0 ]; then
+ echo $pack
+ fi
+ done
+}
+
handle_debian() {
# echo "# Distribution is Debian or compatible"
extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
@@ -74,6 +85,12 @@
$testcmd yum install -y $extra_packs
}
+handle_obsd() {
+ # echo "# Distribution is OpenBSD or compatible"
+ extra_packs=`check_installed_pkgs $PACKAGES_OBSD`
+ $testcmd pkg_add $extra_packs
+}
+
if in_test_mode; then
echo "#############################################"
echo "## $1: test mode."
@@ -85,7 +102,7 @@
unsupported_distro=''
# A number of distributions we don't (yet?) support.
-if [ "$OS" != 'Linux' ]; then
+if [ "$OS" != 'Linux' -a "$OS" != 'OpenBSD' ]; then
echo >&2 "$0: Your OS ($OS) is currently not supported. Aborting."
exit 1
fi
@@ -116,6 +133,8 @@
handle_debian
elif [ -r /etc/redhat-release ]; then
handle_rh
+elif [ "$OS" = 'OpenBSD' ]; then
+ handle_obsd
fi
if ! in_test_mode; then
More information about the asterisk-commits
mailing list