HOWTO
# GNU diffutils 3.2
# =================
# Slackware 12.0, 12.1, 12.2, 13.0: diffutils 2.8.1
# Slackware 13.1, 13.37: diffutils 3.0
# If ftp.gnu.org is busy, use
ibiblio instead
# Prerequisites:
#
gettext (optional)
#
texinfo (optional)
# Get it
cd
test -f installed/diffutils-3.2.tar.xz &&
mv installed/diffutils-3.2.tar.xz .
test ! -f diffutils-3.2.tar.xz &&
wget http://ftp.gnu.org/gnu/diffutils/diffutils-3.2.tar.xz
# Verify tarball w/
md5sum:
# (this came from my gpg-verified tarball)
echo "26ff64c332429c830c154be46b393382 diffutils-3.2.tar.xz" | md5sum -c
# Verify tarball w/
sha1sum:
# (this also came from my gpg-verified tarball)
echo "59b9742e96e2512d4d6f9af7964d71b6ea5a9ef0 diffutils-3.2.tar.xz" | sha1sum -c
# Verify tarball w/
gnupg:
( gpg --list-keys 000BEEEE > /dev/null 2>&1 || gpg --recv-keys 000BEEEE ) &&
wget -nc http://ftp.gnu.org/gnu/diffutils/diffutils-3.2.tar.xz.sig &&
gpg --verify diffutils-3.2.tar.xz.sig && rm diffutils-3.2.tar.xz.sig
# Extract the tarball
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "diffutils-*" -exec rm -r {} \;
tar xJvf ~/diffutils-3.2.tar.xz
cd diffutils-3.2
test $UID = 0 && chown -R root:root .
# Configure and 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 diff diffutils
# Remove a few things that may cause issues
find /usr/share/locale -type f -name "diffutils.mo" -exec rm {} \;
rm -f /usr/man/cat1/cmp.1.gz /usr/man/cat1/sdiff.1.gz
# Install it
make install
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Keep the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/diffutils-*.tar.*
mv diffutils-3.2.tar.xz installed/
# If you ever want to uninstall diffutils, this should do it:
cd
su
test -d src/diffutils-* && ( cd src/diffutils-* ; make uninstall )
( cd /usr/bin ; rm -f cmp diff diff3 sdiff )
( cd /usr/man/man1 ; rm -f cmp.1 diff.1 diff3.1 sdiff.1 )
rm -f /usr/info/diffutils.info
exit
find ~/src -maxdepth 1 -type d -name "diffutils-*" -exec rm -r {} \;
rm -f ~/installed/diffutils-*.tar.*