#!/bin/bash
# 12/02/06 20:20:51 EST -0500
# Made by Alex Brown ("uh oh spaghetti-o") <pianoboy3333@juicemedia.tv>

echo "Installing checkinstall, *password may be needed*"
sudo apt-get install checkinstall

echo "Installing build-essential, *password may be needed*"
sudo apt-get install build-essential

echo "Installing necessary prerequisities for libnotify, *password may be needed*"
sudo apt-get build-dep libnotify1 libnotify-dev
sudo apt-get install gtk-doc-tools

echo "Making directory ./notifycrap and entering it"
mkdir notifycrap
cd notifycrap

echo "Downloading files libnotify-0.4.3.tar.bz2 and notify-python-0.1.1.tar.bz"
wget http://www.galago-project.org/files/releases/source/libnotify/libnotify-0.4.3.tar.bz2
wget http://www.galago-project.org/files/releases/source/notify-python/notify-python-0.1.1.tar.bz2

echo "Un-archiving them"
tar -xjvf libnotify-0.4.3.tar.bz2
tar -xjvf notify-python-0.1.1.tar.bz2

echo "Entering libnotify"
cd libnotify*

echo "Running: ./autogen.sh --prefix=/usr && make && checkinstall"
echo "NOTE: MOSTLIKELY THE INSTALL CHECKINSTALL PERFORMS WILL FAIL (or it should)"
echo "Checkinstall will ask you some crap, just keep pressing your return or enter key"
echo "You may be asked for your password for checkinstall"
./autogen.sh --prefix=/usr && make && sudo checkinstall

echo "Incase checkinstall fails to install, we are going to force install the package, since the dev package is not split off"
echo "*Password may be needed*"
sudo dpkg -i --force-install libnotify*.deb

echo "Libnotify 0.4.3 installed"
echo "--------------------------"

echo "Moving out of libnotify directory"
cd ..

echo "Entering python-notify directory"
cd python-notify*

echo "Running: ./autogen.sh --prefix=/usr && make && checkinstall"
echo "NOTE: MOSTLIKELY THE INSTALL CHECKINSTALL PERFORMS WILL FAIL (or it should)"
echo "Checkinstall will ask you some crap, just keep pressing your return or enter key"
echo "You may be asked for your password for checkinstall"
./autogen.sh --prefix=/usr && make && sudo checkinstall

echo "Done! You may now delete the directory notify crap, or do whatever you want with it"

