# lha 1.14i
# =========
# Slackware 8.1 and up (including current) originally included the original
# 1.14i version of lha, and now include a patched 1.14i (see below).
# If you're using Slackware and you haven't already upgraded things in your
# original 'bin' package, the easiest thing to do would be to grab the latest
# 'bin' package from ftp://ftp.slackware.com/pub/slackware/ for your version
# of slackware and run 'upgradepkg ./bin-*.tgz' to upgrade it.
# The home page link above will take you to the home page for this version.
# There is also a version 1.17 available here, but it is vulnerable to the
# security problems that are fixed by the patch to the 1.14i version.
# The 1.17 version is the one that is listed on freshmeat.net
# lha is part of Slackware's 'bin' package. Run this to remove the old
# lha and to clean up (remove lha from) the 'bin' package's package file:
FNAME=`find /var/adm/packages/bin* -type f | head -1`
egrep -q "^usr/bin/lha$" $FNAME && (
rm -f /usr/bin/lha
cat $FNAME | grep -v "^usr/bin/lha$" > ${FNAME}.new
test -s ${FNAME}.new &&
(
mkdir -p -m 0700 ~/backup/packages
mv -f $FNAME ${FNAME}.`date +%Y%m%d`
mv ${FNAME}.`date +%Y%m%d` ~/backup/packages/
mv -f ${FNAME}.new $FNAME
)
)
unset FNAME
cd
test -f installed/lha-114i.tar.gz && mv installed/lha-114i.tar.gz .
test ! -f lha-114i.tar.gz &&
wget http://www2m.biglobe.ne.jp/~dolphin/lha/prog/lha-114i.tar.gz
cd /usr/local/src
find -type d -maxdepth 1 -name "lha-*" -exec rm -r {} \;
tar xzvf ~/lha-114i.tar.gz
cd lha-114i
chown -R root.root .
# You can use 'make install BINDIR=/usr/bin MANDIR=/usr/man' if you like
# below (instead of 'install -s ...'), but it will install a man page in
# Japanese that you probably can't read.
make
install -s src/lha /usr/bin/
cd
mkdir -p -m 0700 installed
rm -f installed/lha-*.tar.*
mv lha-114i.tar.gz installed/