Charm: oneiric/limesurvey
Revision: 17
Hook: upgrade-charm
#!/bin/bash
where="/var/opt/"
#install dependencies
add-apt-repository -y ppa:charmers/charm-helpers
apt-get update
apt-get upgrade -y
apt-get install -y php5-imap php5-ldap libgd2-xpm php5-gd apache2 libapache2-mod-php5 mysql-client php5-mysql charm-helper-sh
#Download limesurvey 1.91+ sources and check ash
. /usr/share/charm-helper/sh/net.sh
LURL="http://download.limesurvey.org/Latest_stable_release/limesurvey192plus-build120325.tar.bz2"
LHASH="a1815c7b287273a46eb1388a5ba248d2baf45306e35884f310f774bc98a2c159"
download=`ch_get_file $LURL $LHASH`
echo "downloaded $download"
tar -xjf $download --directory $where
# Downloading Latest is not possible because of lack of control sha or md5 access
# use of 7 zip is therefore not required any more (see lp bug#899849)
#
#install php5-zip which is not available in oneiric
#wget -O - http://pecl.php.net/get/zip > zip.tgz
#tar -xzf zip.tgz
#cd zip-*
#phpize
#./configure
#make
#sudo make install
#
#Donload latest limesurvey
#wget -O - http://sourceforge.net/projects/limesurvey/files/latest/download?source=files > ~/limesurvey.7z
#7zr -o$where x ~/limesurvey.7z
#remove the config file so that we know it is not configured
rm $where/limesurvey/config.php