aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-26 14:07:46 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-26 14:07:46 +0000
commit8aac01de679c950c6b0d5a91ee7bad95449a09f2 (patch)
tree2b7d1f15e84c2aa1be70f7188823fc4155d01044
parent1a30e13e22c33da5a49236bda274225637f91089 (diff)
Merged revisions 208886 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r208886 | mvanbaak | 2009-07-26 16:00:52 +0200 (Sun, 26 Jul 2009) | 2 lines add OpenBSD to the install_prereq script ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@208889 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xcontrib/scripts/install_prereq21
1 files changed, 20 insertions, 1 deletions
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 9a162f304..9b3cd1956 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -32,6 +32,8 @@ PACKAGES_DEBIAN="$PACKAGES_DEBIAN libsnmp-dev libiksemel-dev "
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 gmime sqlite sqlite3 jack"
+
KVERS=`uname -r`
case "$1" in
@@ -61,6 +63,15 @@ check_installed_rpms() {
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 @@ handle_rh() {
$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 @@ OS=`uname -s`
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 @@ if [ -r /etc/debian_version ]; then
handle_debian
elif [ -r /etc/redhat-release ]; then
handle_rh
+elif [ "$OS" = 'OpenBSD' ]; then
+ handle_obsd
fi
if ! in_test_mode; then