#!/bin/bash

V=1.4.4
BUILD_DIR=/tmp/rrdbuild-${V}
INSTALL_DIR=/usr/local/rrdtool-${V}

mkdir -p ${BUILD_DIR}

cd ${BUILD_DIR}
wget -qc http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
tar zxf pixman-0.10.0.tar.gz
cd pixman-0.10.0
./configure
make
make install

cd ${BUILD_DIR}
wget -qc http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.bz2
tar jxf freetype-2.3.5.tar.bz2
cd freetype-2.3.5
./configure
make
make install

cd ${BUILD_DIR}
wget -qc http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
tar zxf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure
make
make install

cd ${BUILD_DIR}
wget -qc http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
tar zxf cairo-1.6.4.tar.gz
cd cairo-1.6.4
./configure
make
make install

cd ${BUILD_DIR}
wget -qc http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2
tar jxf pango-1.21.1.tar.bz2
cd pango-1.21.1
./configure
make
make install

cd ${BUILD_DIR}
wget -qc http://oss.oetiker.ch/rrdtool/pub/rrdtool-${V}.tar.gz
tar zxf rrdtool-${V}.tar.gz
cd rrdtool-${V}
./configure --prefix=${INSTALL_DIR}
make
make install
