# Get it
cd
test -f installed/groff-1.23.0.tar.gz && mv installed/groff-1.23.0.tar.gz .
test ! -f groff-1.23.0.tar.gz &&
wget http://ftpmirror.gnu.org/groff/groff-1.23.0.tar.gz
# Verify tarball w/ cksum from coreutils >= 9.2:
echo "a5dX9ZK3UYtJAutq9+VFcL3Mujeocf3bLTCuOGNRHB\
M= groff-1.23.0.tar.gz" | cksum -a sha256 -c
# Verify tarball w/ sha256sum:
# (this came from my cksum and gpg-verified tarball)
echo "6b9757f592b7518b4902eb6af7e54570bdccba37a871fddb2d30ae3863511c\
13 groff-1.23.0.tar.gz" | sha256sum -c
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "groff-*" -exec rm -r {} \;
tar xzvf ~/groff-1.23.0.tar.gz
cd groff-1.23.0
test $UID = 0 && chown -R root:root .
# Read ./README and if upgrading ./NEWS and/or ./ChangeLog
# If you have the 'ghostscript-fonts-std' package installed, you can either
# symlink /usr/share/fonts/Type1 to /usr/share/fonts/type1 or
# use --with-urw-fonts-dir=/usr/share/fonts/Type1
#
# If you do not have 'ghostscript-fonts' installed, you can get fonts
# from https://github.com/ArtifexSoftware/urw-base35-fonts/releases
# See font/devpdf/Foundry.in for paths that gropdf will look for them
# Put PAGE=letter at the beginning of your configure line to use letter
# instead of A4 as the default page size
# Various things may end up in /usr/share/doc/groff-* instead of
# /usr/doc/groff-* as specified by --docdir
# If you do not already have a /usr/share/doc -> /usr/doc symlink,
# that may be a good idea, otherwise you may want/need to use these also:
# --htmldir=/usr/doc/groff-1.23.0
# --dvidir=/usr/doc/groff-1.23.0
# --pdfdir=/usr/doc/groff-1.23.0
# --psdir=/usr/doc/groff-1.23.0
# Configure the build for 64-bit
PAGE=letter ./configure --prefix=/usr --docdir=/usr/doc/groff-1.23.0 \
--infodir=/usr/info --libdir=/usr/lib64 --mandir=/usr/man \
--with-urw-fonts-dir=/usr/share/fonts/Type1
# Configure the build for anything else
PAGE=letter ./configure --prefix=/usr --docdir=/usr/doc/groff-1.23.0 \
--infodir=/usr/info --mandir=/usr/man \
--with-urw-fonts-dir=/usr/share/fonts/Type1
# Build it
make
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg groff
# Clean up old version docs
find /usr/doc -maxdepth 1 -type d -name "groff-*" -exec rm -r {} \;
# If upgrading, old version files may be in here: /usr/share/groff/
# Install the new version
make install
# Create g* symlinks and a z* one
( cd /usr/bin
for bin in eqn indxbib lookbib neqn nroff pic refer soelim tbl troff;
do
test -e g${bin} && rm -f g${bin}
ln -s $bin g${bin}
done
rm -f zsoelim
ln -s soelim zsoelim )
# Without this, 'man' output will have control codes in it as of groff 1.18.x
# Slackware replaces the files in /usr/share/groff/site-tmac/ to disable
# color ANSI output instead.
# If you use a very old Slackware without /etc/profile.d/, you can add the
# "export PAGER" line to /etc/profile
echo '#!/bin/sh' > /etc/profile.d/groff.sh
echo '# This fixes control codes that' >> /etc/profile.d/groff.sh
echo '# appear in "man" output' >> /etc/profile.d/groff.sh
echo 'export PAGER="less -R"' >> /etc/profile.d/groff.sh
chmod +x /etc/profile.d/groff.sh
. /etc/profile.d/groff.sh
# Try it out
man groff
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Either source /etc/profile.d/groff.sh or log out and log back in so the
# settings take effect for your current (non-root) shell
test -r /etc/profile.d/groff.sh && . /etc/profile.d/groff.sh
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/groff-*.tar.*
mv groff-1.23.0.tar.gz installed/
# If you ever want to uninstall GNU roff, this should do it:
cd
su
test -d src/groff-* && ( cd src/groff-* ; make uninstall )
( cd /usr/bin
rm -f addftinfo afmtodit chem eqn eqn2graph gdiffmk grap2graph grn grodvi \
groff groffer grog grolbp grolj4 grops grotty gxditview hpftodit indxbib \
lookbib mmroff neqn nroff pfbtops pic pic2graph post-grohtml pre-grohtml \
preconv refer soelim tbl tfmtodit troff xtotroff )
rm -f /etc/X11/app-defaults/GXditview /usr/info/groff.info
test -d /usr/lib/groff && rm -r /usr/lib/groff
test -d /usr/lib64/groff && rm -r /usr/lib64/groff
test -d /usr/share/groff && rm -r /usr/share/groff
exit
find ~/src -maxdepth 1 -type d -name "groff-*" -exec rm -r {} \;
rm -f ~/installed/groff-*.tar.*