#!/bin/bash

#
# install-dependencies-yum
#
# Copyright (C) 2009-11 by RStudio, Inc.
#
# This program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#

set -e

# build/development tools
sudo yum install -y make
sudo yum install -y gcc
sudo yum install -y gcc-c++
sudo yum install -y cmake
sudo yum install -y rpmdevtools

# core system libraries
sudo yum install -y libuuid-devel
sudo yum install -y openssl-devel
sudo yum install -y bzip2-devel
sudo yum install -y pam-devel

# boost
sudo yum install -y boost-devel

# pango cairo
sudo yum install -y pango-devel

# gwt prereqs
sudo yum install -y java-1.6.0-openjdk 
sudo yum install -y ant
sudo yum install -y xml-commons-apis

# gwt
cd ../common
./install-gwt
cd ../linux

# desktop dependencies (qt)
if [ "$1" != "--server-only" ]
then
   sudo yum -y install qt4-devel
   sudo yum -y install qt-webkit-devel
fi



