1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00
profanity/install-all.sh

182 lines
3.6 KiB
Bash
Raw Normal View History

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
sudo apt-get -y install g++ autoconf libssl-dev libexpat1-dev libncurses5-dev libxml2-dev libglib2.0-dev libnotify-dev libcurl3-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`
sudo yum -y install gcc gcc-c++ autoconf automake openssl-devel.$ARCH expat-devel.$ARCH ncurses-devel.$ARCH libxml2-devel.$ARCH glib2-devel.$ARCH libnotify-devel.$ARCH libcurl-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
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
chmod +x apt-cyg
mv apt-cyg /usr/local/bin/
apt-cyg install make gcc automake autoconf pkg-config openssl-devel expat zlib-devel libncurses-devel libncurses-devel libxml2-devel libglib2.0-devel libcurl-devel libidn-devel libssh2-devel libkrb5-devel openldap-devel
ln -s /usr/bin/gcc-3.exe /usr/bin/gcc.exe
ln -s /usr/bin/g++-3.exe /usr/bin/g++.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_head_unit()
{
echo
echo Profanity installer... installing head-unit
echo
git clone git://github.com/boothj5/head-unit.git
cd head-unit
make
sudo make install
cd ..
}
install_lib_strophe()
{
echo
echo Profanity installer... installing libstrophe
echo
git clone git://github.com/metajack/libstrophe.git
cd libstrophe
./bootstrap.sh
./configure
make
sudo make install
cd ..
}
install_profanity()
{
echo
echo Profanity installer... installing Profanity
echo
./bootstrap.sh
./configure
make
sudo make install
}
2012-09-08 12:58:42 -04:00
cyg_install_head_unit()
{
echo
echo Profanity installer... installing head-unit
echo
git clone git://github.com/boothj5/head-unit.git
cd head-unit
make
make install
cd ..
}
cyg_install_lib_strophe()
{
echo
echo Profanity installer... installing libstrophe
echo
git clone git://github.com/metajack/libstrophe.git
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
./bootstrap.sh
./configure
make
make install
}
2012-07-21 19:49:19 -04:00
cleanup()
{
echo
echo Profanity installer... cleaning up
echo
echo Removing head-unit repository...
rm -rf head-unit
echo Removing libstrophe repository...
rm -rf libstrophe
echo
echo Profanity installer... complete!
echo
echo Type \'profanity\' to run.
echo
}
OS=`uname -s`
2012-07-21 19:49:19 -04:00
DIST=unknown
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
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
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_head_unit
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_head_unit
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_head_unit
cyg_install_lib_strophe
cyg_install_profanity
2012-07-21 19:49:19 -04:00
;;
esac
cleanup