cd
test -f installed/enca-1.8.tar.bz2 && mv installed/enca-1.8.tar.bz2 .
test ! -f enca-1.8.tar.bz2 &&
wget http://trific.ath.cx/Ftp//enca/enca-1.8.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "enca-*" -exec rm -r {} \;
tar xjvf ~/enca-1.8.tar.bz2
cd enca-1.8
test $UID = 0 && chown -R root:root .
./configure
make
make check
su -c "make install"
cd
mkdir -p -m 0700 installed
rm -f installed/enca-*.tar.*
mv enca-1.8.tar.bz2 installed/
# If you ever want to uninstall enca, this should do it:
cd
su
test -d src/enca-* && ( cd src/enca-* ; make uninstall )
rm -f /usr/local/bin/enca /usr/local/include/enca.h \
/usr/local/lib/libenca.* /usr/local/lib/pkgconfig/enca.pc \
/usr/local/libexec/enca /usr/local/man/man1/enca.1 \
/usr/local/share/gtk-doc/html/libenca
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "enca-*" -exec rm -r {} \;
rm -f ~/installed/enca-*.tar.*