HOWTO
# lftp 3.7.14
# ===========
# Slackware 11.0: lftp 3.5.4
# Slackware 12.0: lftp 3.5.10
# Slackware 12.1: lftp 3.7.0
# Slackware 12.2: lftp 3.7.4
# Many of the mirrors lag behind or have connection trouble, so here are a
# few different places to get it
#
# The home site in Russia:
#
http://ftp.yars.free.net/pub/source/lftp/
# Atlanta, Georgia, USA (usually outdated):
#
ftp://ftp.130th.net/pub/mirror/lftp/
# The UK mirror is password protected as I write this...
#
ftp://ftp.130th.net/pub/mirror/lftp/
# Ibiblio (USA):
#
http://ibiblio.org/pub/Linux/system/network/file-transfer/
#
http://ibiblio.org/pub/Linux/Incoming/ (if it was just released)
# If you have an old version of lftp installed under the /usr/local prefix,
# follow the uninstall instructions at the bottom before you begin below
# Prerequisites:
#
bison
#
iconv
#
gettext
#
ncurses
#
readline
#
GnuTLS or
OpenSSL
#
expat
cd
test -f installed/lftp-3.7.14.tar.bz2 && mv installed/lftp-3.7.14.tar.bz2 .
test ! -f lftp-3.7.14.tar.bz2 &&
wget http://ftp.yars.free.net/pub/source/lftp/lftp-3.7.14.tar.bz2
# Verify tarball w/
md5sum:
echo "723d372833d6a94c15cc78cc98565517 lftp-3.7.14.tar.bz2" | md5sum -c
# Verify tarball w/
sha1sum:
# (this came from my gpg-verified tarball)
echo "b36819aa9624057f1c9067867579c2ac509c72e7 lftp-3.7.14.tar.bz2" | sha1sum -c
# Verify tarball w/
gpg:
( gpg --list-keys F2A99A18 > /dev/null 2>&1 || gpg --recv-keys F2A99A18 ) &&
wget -nc http://ftp.yars.free.net/pub/source/lftp/lftp-3.7.14.tar.bz2.asc &&
gpg --verify lftp-3.7.14.tar.bz2.asc && rm lftp-3.7.14.tar.bz2.asc
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "lftp-*" -exec rm -r {} \;
tar xjvf ~/lftp-3.7.14.tar.bz2
cd lftp-3.7.14
test $UID = 0 && chown -R root:root .
# As of version 3.2.0, configure will use GnuTLS by default. It will only
# use OpenSSL if you tell it to via the --with-openssl flag, even if GnuTLS
# is not installed. If it was installed in the standard source location,
# pass this to configure: --with-openssl=/usr/local/ssl If GnuTLS is
# installed somewhere where configure can't find it, specify it's prefix
# with --with-libgnutls-prefix=/the/prefix/its/installed/under
./configure --prefix=/usr --disable-nls
make
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg lftp
# Remove old files in /usr/lib/ftp then install it
find /usr/lib/lftp -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;
make install
# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .
# Become yourself again
exit
cd
mkdir -p -m 0700 installed
rm -f installed/lftp-*.tar.*
mv lftp-3.7.14.tar.bz2 installed/
# If you ever need to uninstall lftp, this should do it.
#
# I tried running 'make uninstall' in the source directory with version 3.2.1,
# but that got stuck in a loop and ate up every available file handle bringing
# the load average up to a few hundred, so I ctrl-C'd it :-) Needless to say,
# either run 'make -n uninstall' first to see what would happen, or just don't
# do it at all.
cd
su
find src -maxdepth 1 -type d -name "lftp-*" -exec rm -r {} \;
for cfgfile in /usr/local/etc/lftp.conf /etc/lftp.conf; do
test -f $cfgfile &&
( mkdir -p -m 0700 ~/backup ; mv -f $cfgfile ~/backup/ )
done
for pfx in /usr/local /usr; do
rm -f ${pfx}/bin/lftp ${pfx}/bin/lftpget ${pfx}/man/man1/lftp.1 ${pfx}/share/man/man1/lftp.1
test -d ${pfx}/lib/lftp && rm -r ${pfx}/lib/lftp
test -d ${pfx}/share/lftp && rm -r ${pfx}/share/lftp
find ${pfx}/share/locale -name "lftp.mo" -exec rm {} \;
done
removepkg lftp
exit
test -d ~/.lftp && rm -r ~/.lftp
rm -f ~/installed/lftp-*.tar.*