# Get the source
cd
test -f installed/indent-2.2.10.tar.gz && mv installed/indent-2.2.10.tar.gz .
test ! -f indent-2.2.10.tar.gz &&
wget http://ftpmirror.gnu.org/indent/indent-2.2.10.tar.gz
# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "be35ea62705733859fbf8caf816d8959 indent-2.2.10.tar.gz" | md5sum -c
# Extract the source
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "indent-*" -exec rm -r {} \;
tar xzvf ~/indent-2.2.10.tar.gz
cd indent-2.2.10
test $UID = 0 && chown -R root:root .
# Configure the build, build it
./configure --prefix=/usr --infodir=/usr/info --mandir=/usr/man --disable-nls
make
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg indent
# Install it
make install-strip
# Become yourself again
exit
# Keep the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/indent-*.tar.*
mv indent-2.2.10.tar.gz installed/
# If you ever want to uninstall indent, this should do it:
cd
su
test -d src/indent-* && ( cd src/indent-* ; make uninstall )
test -d /usr/doc/indent && rm -r /usr/doc/indent
rm -f /usr/bin/indent /usr/bin/texinfo2man /usr/info/indent.info\
/usr/man/man1/indent.1
exit
find ~/src -maxdepth 1 -type d -name "indent-*" -exec rm -r {} \;
rm -f ~/installed/indent-*.tar.*