# Get the tarball
cd
test -f installed/lzop-1.04.tar.gz && mv installed/lzop-1.04.tar.gz .
test ! -f lzop-1.04.tar.gz &&
wget https://www.lzop.org/download/lzop-1.04.tar.gz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "lzop-*" -exec rm -r {} \;
tar xzvf ~/lzop-1.04.tar.gz
cd lzop-1.04
test $UID = 0 && chown -R root:root .
# Configure the build
./configure --docdir=/usr/local/doc/lzop --mandir=/usr/local/man
# Build it
make
# Install it
su -c "make install"
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/lzop-*.tar.*
mv lzop-1.04.tar.gz installed/
# If you ever want to uninstall lzop, this should do it:
cd
su
test -d src/lzop-* && ( cd src/lzop-* ; make uninstall )
test -d /usr/local/doc/lzop && rm -r /usr/local/doc/lzop
rm -f /usr/local/bin/lzop /usr/local/man/man1/lzop.1
exit
find ~/src -maxdepth 1 -type d -name "lzop-*" -exec rm -r {} \;
rm -f ~/installed/lzop-*.tar.*