Linux HOWTOs

About | Home | Search

HOWTO: indent
Description: Beautifies code making it easier to read
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything

# GNU indent 2.2.10
# =================
# Slackware 13.0, 13.1, 13.37, 14.0: indent 2.2.10

# If you ever want to uninstall indent, or clean up files from an old
# version before installing this one, skip down to the bottom for notes.

# Below the URL is used to automatically choose a nearby
# and up-to-date GNU mirror.

# Prerequisites:
# teTeX (optional)
# texinfo (optional)
# gettext
# iconv
# bison

# Get the source
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 &&

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "be35ea62705733859fbf8caf816d8959  indent-2.2.10.tar.gz" | md5sum -c

# Verify tarball w/ gpg:
( gpg --list-keys D9FC8D73 > /dev/null 2>&1 || gpg --recv-keys D9FC8D73 ) &&
 wget -nc &&
 gpg --verify indent-2.2.10.tar.gz.sig && rm indent-2.2.10.tar.gz.sig

# 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

# Become root to install it

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg indent

# Install it
make install-strip

# Become yourself again

# Keep the source for later
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:
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/\
find ~/src -maxdepth 1 -type d -name "indent-*" -exec rm -r {} \;
rm -f ~/installed/indent-*.tar.*

Back to the list

Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>