2012-07-09 21:14:07 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-09-08 12:28:33 -04:00
|
|
|
debian_prepare()
|
2012-07-21 19:49:19 -04:00
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer ... updating apt repositories
|
|
|
|
echo
|
|
|
|
sudo apt-get update
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing dependencies
|
|
|
|
echo
|
2013-01-03 20:17:40 -05:00
|
|
|
sudo apt-get -y install git autoconf libssl-dev libexpat1-dev libncursesw5-dev libglib2.0-dev libnotify-dev libcurl3-dev libxss-dev
|
2012-07-21 19:49:19 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-09-08 12:28:33 -04:00
|
|
|
fedora_prepare()
|
2012-07-21 19:49:19 -04:00
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing dependencies
|
|
|
|
echo
|
|
|
|
|
|
|
|
ARCH=`arch`
|
|
|
|
|
2012-12-30 18:58:53 -05:00
|
|
|
sudo yum -y install gcc git autoconf automake openssl-devel.$ARCH expat-devel.$ARCH ncurses-devel.$ARCH glib2-devel.$ARCH libnotify-devel.$ARCH libcurl-devel.$ARCH libXScrnSaver-devel.$ARCH
|
2012-07-21 19:49:19 -04:00
|
|
|
}
|
|
|
|
|
2012-09-08 12:28:33 -04:00
|
|
|
cygwin_prepare()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing dependencies
|
|
|
|
echo
|
|
|
|
|
2013-08-11 12:00:06 -04:00
|
|
|
wget --no-check-certificate https://raw.github.com/boothj5/apt-cyg/master/apt-cyg
|
|
|
|
#wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
|
2012-09-08 12:28:33 -04:00
|
|
|
chmod +x apt-cyg
|
|
|
|
mv apt-cyg /usr/local/bin/
|
|
|
|
|
2013-10-07 11:53:47 -04:00
|
|
|
if [ -n "$CYG_MIRROR" ]; then
|
|
|
|
apt-cyg -m $CYG_MIRROR install make automake autoconf pkg-config openssl-devel libexpat-devel zlib-devel libncursesw-devel libglib2.0-devel libcurl-devel libidn-devel libssh2-devel libkrb5-devel openldap-devel
|
|
|
|
else
|
|
|
|
apt-cyg install make automake autoconf pkg-config openssl-devel libexpat-devel zlib-devel libncursesw-devel libglib2.0-devel libcurl-devel libidn-devel libssh2-devel libkrb5-devel openldap-devel
|
|
|
|
fi
|
|
|
|
|
2012-09-08 12:28:33 -04:00
|
|
|
ln -s /usr/bin/gcc-3.exe /usr/bin/gcc.exe
|
2012-09-08 13:35:34 -04:00
|
|
|
|
|
|
|
export LIBRARY_PATH=/usr/local/lib/
|
2012-09-08 12:28:33 -04:00
|
|
|
}
|
|
|
|
|
2012-07-21 19:49:19 -04:00
|
|
|
install_lib_strophe()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing libstrophe
|
|
|
|
echo
|
2013-07-22 17:15:24 -04:00
|
|
|
git clone git://github.com/strophe/libstrophe.git
|
2012-07-21 19:49:19 -04:00
|
|
|
cd libstrophe
|
|
|
|
./bootstrap.sh
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
install_profanity()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing Profanity
|
|
|
|
echo
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
}
|
|
|
|
|
2012-09-08 12:58:42 -04:00
|
|
|
cyg_install_lib_strophe()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing libstrophe
|
|
|
|
echo
|
2013-07-22 17:15:24 -04:00
|
|
|
git clone git://github.com/strophe/libstrophe.git
|
2012-09-08 12:58:42 -04:00
|
|
|
cd libstrophe
|
|
|
|
./bootstrap.sh
|
|
|
|
./bootstrap.sh # second call seems to fix problem on cygwin
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
cyg_install_profanity()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... installing Profanity
|
|
|
|
echo
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
}
|
|
|
|
|
2012-07-21 19:49:19 -04:00
|
|
|
cleanup()
|
|
|
|
{
|
|
|
|
echo
|
|
|
|
echo Profanity installer... cleaning up
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo Removing libstrophe repository...
|
|
|
|
rm -rf libstrophe
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo Profanity installer... complete!
|
|
|
|
echo
|
|
|
|
echo Type \'profanity\' to run.
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
2013-10-07 11:53:47 -04:00
|
|
|
while getopts m: opt
|
|
|
|
do
|
|
|
|
case "$opt" in
|
|
|
|
m) CYG_MIRROR=$OPTARG;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2012-09-08 09:54:41 -04:00
|
|
|
OS=`uname -s`
|
2012-07-21 19:49:19 -04:00
|
|
|
DIST=unknown
|
|
|
|
|
2012-09-08 09:54:41 -04:00
|
|
|
if [ "${OS}" = "Linux" ]; then
|
|
|
|
if [ -f /etc/fedora-release ]; then
|
|
|
|
DIST=fedora
|
2012-09-08 10:07:03 -04:00
|
|
|
elif [ -f /etc/debian_version ]; then
|
2012-09-08 09:54:41 -04:00
|
|
|
DIST=debian
|
|
|
|
fi
|
2012-09-08 12:28:33 -04:00
|
|
|
else
|
|
|
|
echo $OS | grep -i cygwin
|
|
|
|
if [ "$?" -eq 0 ]; then
|
|
|
|
DIST=cygwin
|
|
|
|
fi
|
2012-07-21 19:49:19 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
case "$DIST" in
|
2012-09-08 09:54:41 -04:00
|
|
|
unknown) echo The install script will not work on this OS.
|
|
|
|
echo Try a manual install instead.
|
2012-07-21 19:49:19 -04:00
|
|
|
exit
|
|
|
|
;;
|
2012-09-08 12:28:33 -04:00
|
|
|
fedora) fedora_prepare
|
2012-09-08 12:58:42 -04:00
|
|
|
install_lib_strophe
|
|
|
|
install_profanity
|
2012-09-08 12:28:33 -04:00
|
|
|
;;
|
|
|
|
debian) debian_prepare
|
2012-09-08 12:58:42 -04:00
|
|
|
install_lib_strophe
|
|
|
|
install_profanity
|
2012-07-21 19:49:19 -04:00
|
|
|
;;
|
2012-09-08 12:28:33 -04:00
|
|
|
cygwin) cygwin_prepare
|
2012-09-08 12:58:42 -04:00
|
|
|
cyg_install_lib_strophe
|
|
|
|
cyg_install_profanity
|
2012-07-21 19:49:19 -04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
cleanup
|