# ccache 2.4
# ==========
# Slackware 9.0 and 9.1's 'ccache' packages include version 2.2, 10.0's
# includes 2.3, 10.1 and 10.2's include 2.4
cd
test -f installed/ccache-2.4.tar.gz && mv installed/ccache-2.4.tar.gz .
test ! -f ccache-2.4.tar.gz &&
wget http://samba.org/ftp/ccache/ccache-2.4.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "ccache-*" -exec rm -r {} \;
tar xzvf ~/ccache-2.4.tar.gz
cd ccache-2.4
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr
make
su -c "test -x /sbin/removepkg && /sbin/removepkg ccache ; make install"
cd
mkdir -p -m 0700 installed
rm -f installed/ccache-*.tar.*
mv ccache-2.4.tar.gz installed/
# If you ever want to uninstall ccache, this should do it:
su -c "rm -f /usr/bin/ccache /usr/man/man1/ccache.1"
find ~/src -maxdepth 1 -type d -name "ccache-*" -exec rm -r {} \;
rm -f ~/installed/ccache-*.tar.*