# Remove the slackware versions of zip and unzip
su -c "removepkg infozip"
# If you have a previously installed source-based installation that went
# into /usr/local:
su -c "rm -f /usr/local/bin/funzip /usr/local/bin/unzip \
/usr/local/bin/unzipsfx /usr/local/bin/zipgrep \
/usr/local/bin/zipinfo /usr/local/man/man1/funzip.1 \
/usr/local/man/man1/unzip.1 /usr/local/man/man1/unzipsfx.1 \
/usr/local/man/man1/zipgrep.1 /usr/local/man/man1/zipinfo.1"
# zcrypt is now included with zip and unzip (the LZW patents expired):
test -f installed/infozip/zcrypt.zip && rm -f installed/infozip/zcrypt.zip
# UnZip 5.52
# ==========
cd
test -f installed/infozip/unzip552.tar.gz &&
mv installed/infozip/unzip552.tar.gz ./unzip552.tgz
test ! -f unzip552.tgz &&
test -f installed/infozip/unzip552.tgz &&
mv installed/infozip/unzip552.tgz .
test ! -f unzip552.tgz &&
wget ftp://ftp.info-zip.org/pub/infozip/src/unzip552.tgz
cd src/infozip
find -maxdepth 1 -type d -name "unzip-*" -exec rm -r {} \;
tar xzvf ~/unzip552.tgz
cd unzip-5.52
test $UID = 0 && chown -R root:root .
make -f unix/Makefile generic
# Become root
su
make -f unix/Makefile prefix=/usr install
( cd /usr/bin ; strip funzip unzip unzipsfx zipinfo )
# Become yourself again
exit
cd
rm -f installed/infozip/unzip*.tar.*
mv unzip552.tgz installed/infozip/
# Zip 2.32
# ========
cd
test -f installed/infozip/zip232.tar.gz &&
mv installed/infozip/zip232.tar.gz ./zip232.tgz
test ! -f zip232.tgz &&
test -f installed/infozip/zip232.tgz &&
mv installed/infozip/zip232.tgz .
test ! -f zip232.tgz &&
wget ftp://ftp.info-zip.org/pub/infozip/src/zip232.tgz
cd src/infozip
find -maxdepth 1 -type d -name "zip-*" -exec rm -r {} \;
tar xzvf ~/zip232.tgz
cd zip-2.32
test $UID = 0 && chown -R root:root .
make -f unix/Makefile generic
# Become root
su
make -f unix/Makefile prefix=/usr install
( cd /usr/bin ; strip zip zipcloak zipnote zipsplit )
# Become yourself again
exit
cd
rm -f installed/infozip/zip*.tar.* installed/infozip/zip*.tgz
mv zip232.tgz installed/infozip/