cd
test -f installed/libsvg-0.1.4.tar.gz &&
mv installed/libsvg-0.1.4.tar.gz .
test ! -f libsvg-0.1.4.tar.gz &&
wget http://cairographics.org/snapshots/libsvg-0.1.4.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libsvg-?.*" -exec rm -r {} \;
tar xzvf ~/libsvg-0.1.4.tar.gz
cd libsvg-0.1.4
test $UID = 0 && chown -R root:root .
find -type f -exec chmod 644 {} \;
chmod 755 configure
./configure
make
su -c "make install ; ldconfig"
cd
mkdir -p -m 0700 installed
rm -f installed/libsvg-?.*.tar.*
mv libsvg-0.1.4.tar.gz installed/
# If you ever want to uninstall libsvg, this should do it:
cd
su
test -d src/libsvg-* && ( cd src/libsvg-* ; make uninstall )
rm -f /usr/local/include/svg.h /usr/local/lib/libsvg.* \
/usr/local/lib/pkgconfig/libsvg.pc
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libsvg-*" -exec rm -r {} \;
rm -f ~/installed/libsvg-*.tar.*