# whois 5.0.11
# ============
# If you don't like this particular 'whois' for some reason, you may
# want to check out GNU jwhois as an alternative:
# http://www.gnu.org/software/jwhois/
#
# The whois covered below is the one included with Slackware, Debian, Ubuntu,
# etc.
# Slackware 8.0 and down included whois in the 'tcpip1' package, then
# in the 'tcpip' package after that, and I believe somewhere around 9.0
# is when the 'whois' package was created.
# If you want to uninstall whois, or ensure that all old files are removed
# before installing a new version, skip down to the bottom for uninstall
# instructions.
cd
test -f installed/whois_5.0.11.tar.gz && mv installed/whois_5.0.11.tar.gz .
test ! -f whois_5.0.11.tar.gz &&
wget http://ftp.debian.org/debian/pool/main/w/whois/whois_5.0.11.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "whois-*" -exec rm -r {} \;
tar xzvf ~/whois_5.0.11.tar.gz
cd whois-5.0.11
test $UID = 0 && chown -R root:root .
# Compile it
make
# Become root to install it
su
# Remove the old Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg whois
# Install the new version
#
# I don't use 'make install' here because I don't want to install the
# included 'mkpasswd' in /usr/bin, which may be confused with the 'mkpasswd'
# that is included with the 'shadow' package in /usr/sbin. (you can use
# 'make install-whois' to only install whois though)
#
# ...and because I'd have to patch/edit the Makefile to install the man
# pages in /usr/man instead of /usr/share/man. That would be nice if
# a commandline specifyable $MANDIR were made available in there in the
# future, but certainly not a big deal to do this instead. FYI, if you
# have a /usr/share/man -> /usr/man symlink, it doesn't matter.
install -m 0755 whois /usr/bin/
install -m 0644 whois.1 /usr/man/man1/
# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .