# Get it
cd
test -f installed/augeas-1.10.1.tar.gz &&
mv -f installed/augeas-1.10.1.tar.gz .
test ! -f augeas-1.10.1.tar.gz &&
wget http://download.augeas.net/augeas-1.10.1.tar.gz
# Verify tarball w/ sha1sum:
# (this came from my gpg-verified tarball)
echo "3cfa4870fac3b6697e8039cb611cb0c5a75498a4 augeas-1.10.1.tar.gz" | \
sha1sum -c
# Extract the source
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "augeas-*" -exec rm -r {} \;
tar xzvf ~/augeas-1.10.1.tar.gz
cd augeas-1.10.1
test $UID = 0 && chown -R root:root .
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --libdir=/usr/local/lib64 --mandir=/usr/local/man
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --mandir=/usr/local/man
# Build it
make
# Become root to install it
su
# Install it
make install
ldconfig
# Because the default prefix of /usr/local is used here, the vim files will
# be installed under /usr/local/share/vim/vimfiles. If your vim is installed
# in the /usr prefix, you may need to symlink or move them, or change vim
# configuration for them to be usable. I have not tested this whatsoever.
( cd /usr/share/vim/vimfiles
ln -s /usr/local/share/vim/vimfiles/ftdetect
ln -s /usr/local/share/vim/vimfiles/syntax )
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R g+w .
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/augeas-*.tar.*
mv augeas-1.10.1.tar.gz installed/
# If you ever want to uninstall Augeas, this should do it:
cd
su
test -d src/augeas-* && ( cd src/augeas-* ; make uninstall )
( cd /usr/local/bin ; rm -f augmatch augparse augtool fadot )
( cd /usr/local/include ; rm -f augeas.h fa.h )
( cd /usr/local/lib ; rm -f libaugeas.* libfa.* )
test -d /usr/local/lib64 &&
( cd /usr/local/lib64 ; rm -f libaugeas.* libfa.* )
( cd /usr/local/man ; rm -f augmatch.1 augparse.1 augtool.1 )
test -d /usr/local/share/augeas && rm -r /usr/local/share/augeas
test -d /usr/local/share/vim/vimfiles &&
( cd /usr/local/share/vim/vimfiles
rm -f ftdetect/augeas.vim syntax/augeas.vim )
rm -f /usr/local/lib*/pkgconfig/augeas.pc
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "augeas-*" -exec rm -r {} \;
rm -f ~/installed/augeas-*.tar.*