# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "gsasl-*" -exec rm -r {} \;
tar xzvf ~/gsasl-2.2.0.tar.gz
cd gsasl-2.2.0
test $UID = 0 && chown -R root:root .
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --disable-nls --infodir=/usr/local/info \
--libdir=/usr/local/lib64 --mandir=/usr/local/man
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --disable-nls --infodir=/usr/local/info --mandir=/usr/local/man
# Build it
make
# Check the build
make check
# Become root to install it
su
# Install it
make install
ldconfig
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/gsasl-*.tar.*
mv gsasl-2.2.0.tar.gz installed/
# If you ever want to uninstall GNU SASL, this should do it:
# ('make uninstall' as root should do it, the rest is just in case)
cd
su
test -d src/gsasl-* && ( cd src/gsasl-* ; make uninstall )
( cd /usr/local/include
rm -f gsasl.h gsasl-mech.h gsasl-version.h )
( cd /usr/local/lib
rm -f libgsasl.* pkgconfig/libgsasl.pc )
test -d /usr/local/lib64 &&
( cd /usr/local/lib64
rm -f /usr/local/lib64/libgsasl.* pkgconfig/libgsasl.pc )
rm -f /usr/local/bin/gsasl /usr/local/info/gsasl.info \
/usr/local/man/man1/gsasl.1 /usr/local/man/man3/gsasl_*.3
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "gsasl-*" -exec rm -r {} \;
rm -f ~/installed/gsasl-*.tar.*