#!/bin/sh
#
# Install icecast, libshout, and ices using defaults where possible
#
# BEFORE RUNNING THIS SCRIPT:
#	'make uninstall' from previous installation directories, if any.
#
(date

rm -rf icecast-2.3.1
tar xvzf icecast-2.3.1.tar.gz
cd icecast-2.3.1
./configure && make && make install
cat conf/icecast.xml.dist | sed \
	-e 's/nogroup/nobody/g' \
	>/usr/local/etc/icecast.xml
mkdir -p /usr/local/var/log/icecast
chmod 777 /usr/local/var/log/icecast

cd ..
rm -rf libshout-2.1
tar xvzf libshout-2.1.tar.gz
cd libshout-2.1
./configure && make && make install

cd ..
rm -rf lame-3.93.1
tar xvzf lame-3.93.1.tar.gz
cd lame-3.93.1
./configure && make && make install

cd ..
rm -rf ices-0.4
tar xvzf ices-0.4.tar.gz
cd ices-0.4
./configure && make && make install

date) 2>&1 | tee log-`date '+%Y-%m%d-%H%M'`
