HOWTO
# Lynx 2.8.9
# ==========
# Slackware 13.1, 13.37, 14.0, 14.1: lynx 2.8.7
# Slackware 14.2: lynx 2.8.8rel.2
# Prerequisites:
#
bison
#
iconv
#
sendmail
#
OpenSSL (--with-ssl) or
GnuTLS (--with-gnutls)
#
pkg-config
#
ncurses
#
gzip
#
bzip2
#
zlib
#
telnet (optional; to handle telnet:// URLs)
#
tn3270 (optional; to handle tn3270:// URLs)
#
rlogin (optional; to handle rlogin:// URLs)
#
tar (optional)
#
uudecode (optional)
#
zip, unzip (optional)
#
compress (optional)
# Get it
cd
test -f installed/lynx2.8.9rel.1.tar.bz2 &&
mv installed/lynx2.8.9rel.1.tar.bz2 .
test ! -f lynx2.8.9rel.1.tar.bz2 &&
wget https://invisible-mirror.net/archives/lynx/tarballs/lynx2.8.9rel.1.tar.bz2
# Verify tarball w/
sha256sum:
# (this came from my gpg-verified tarball)
echo "387f193d7792f9cfada14c60b0e5c0bff18f227d9257a39483e14fa1aaf79595 lynx2.8.9rel.1.tar.bz2" | sha256sum -c
( gpg --list-keys F7E48EDB > /dev/null 2>&1 || gpg --recv-keys F7E48EDB ) &&
wget -nc https://invisible-mirror.net/archives/lynx/tarballs/lynx2.8.9rel.1.tar.bz2.asc &&
gpg --verify lynx2.8.9rel.1.tar.bz2.asc &&
rm lynx2.8.9rel.1.tar.bz2.asc
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "lynx?.*" -exec rm -r {} \;
find -maxdepth 1 -type d -name "lynx?-*" -exec rm -r {} \;
tar xjvf ~/lynx2.8.9rel.1.tar.bz2
cd lynx2.8.9rel.1
test $UID = 0 && chown -R root:root .
# Everything used to go into /usr/lib/lynx, now here's where various
# things will end up (look at userdefs.h and makefile after you run
# configure if you want to change it):
# /etc/lynx.cfg
# /etc/lynx.lss
# /etc/mailcap
# /etc/mime.types
# /usr/share/lynx_doc/
# /usr/share/lynx_help/
#
# If you want mailcap and mime.types to go somewhere other than /etc,
# specify that with --with-mime-libdir
# If you want lynx.lss to go somewhere else, specify --with-lss-file
# If you want lynx.cfg to go somewhere else, specity --with-cfg-file
# If you have OpenSSL < 1.1.0 installed under the default source prefix
# of /usr/local/ssl, use --with-ssl=/usr/local/ssl and it should work
# for lib or lib64
# Configure the build
./configure --prefix=/usr --sysconfdir=/etc --disable-nls --with-ssl --with-screen=ncurses --enable-color-style --enable-default-colors --enable-scrollbar --enable-nsl-fork --enable-gzip-help --with-bzlib --with-zlib
# Build it
make
# Become root to install it
su
# Back up your lynx.cfg, wherever it happens to be:
mkdir -p -m 0700 ~/backup
for cfgfile in /usr/local/lib/lynx.cfg /usr/lib/lynx/lynx.cfg /etc/lynx.cfg;
do
BAKNAME="lynx.cfg-$(date +%Y%m%d)"
( cd ~/backup
test -f ${BAKNAME}.old && mv -f ${BAKNAME}.old ${BAKNAME}.old2
test -f $BAKNAME && mv -f $BAKNAME ${BAKNAME}.old
test -f $cfgfile && cp -a $cfgfile $BAKNAME && chmod 600 $BAKNAME )
unset BAKNAME
done
# If you previously had lynx installed into the /usr/local prefix, run
# this to remove that version (you may want to back up
# /usr/local/lib/lynx.cfg first):
rm -f /usr/local/bin/lynx /usr/local/bin/lynx.old /usr/local/man/man1/lynx.1 /usr/local/lib/lynx.cfg /usr/local/lib/lynx.oldcfg /usr/local/lib/lynx.lss /usr/local/lib/lynx.oldlss
test -d /usr/local/lib/lynx_doc && rm -r /usr/local/lib/lynx_doc
test -d /usr/local/lib/lynx_help && rm -r /usr/local/lib/lynx_help
# Remove the Slackware package, if there is one, and other old files
test -x /sbin/removepkg && /sbin/removepkg lynx
test -d /usr/lib/lynx && rm -r /usr/lib/lynx
# Install it
make install
make install-help
make install-doc
# Install a sample mailcap and mime.types in /etc if you don't have them
test ! -f /etc/mailcap && cp samples/mailcap /etc/
test ! -f /etc/mime.types && cp samples/mime.types /etc/
# Remove lynx.oldcfg, lynx.oldlss, lynx.old, etc. if they're the same
# as the regular version.
test -f /etc/lynx.oldcfg &&
diff -q /etc/lynx.oldcfg /etc/lynx.cfg && rm -f /etc/lynx.oldcfg
test -f /etc/lynx.oldlss &&
diff -q /etc/lynx.oldlss /etc/lynx.lss && rm -f /etc/lynx.oldlss
test -f /usr/bin/lynx.old &&
diff -q /usr/bin/lynx.old /usr/bin/lynx && rm -f /usr/bin/lynx.old
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/lynx*.tar.* installed/lynx*.patch
mv lynx2.8.9rel.1.tar.bz2 installed/
# If you ever want to uninstall lynx, this should do it:
cd
su
test -d src/lynx* &&
( cd src/lynx* ; make uninstall uninstall-doc uninstall-help )
rm -f /etc/lynx.cfg /etc/lynx.lss /etc/lynx.oldcfg /etc/lynx.oldlss
for pfx in /usr /usr/local; do
rm -f "$pfx/bin/lynx" "$pfx/bin/lynx.old" "$pfx/lib/lynx.*" "$pfx/man/man1/lynx.1"
test -d "$pfx/lib/lynx" && rm -r "$pfx/lib/lynx"
test -d "$pfx/share/lynx_doc" && rm -r "$pfx/share/lynx_doc"
test -d "$pfx/share/lynx_help" && rm -r "$pfx/share/lynx_help"
done
exit
find ~/src -maxdepth 1 -type d -name "lynx*" -exec rm -r {} \;
rm -f ~/installed/lynx*.tar.*