#! /bin/cat

# Build procedure for lzma_alone-4.65:  Assumes that you have source code,
# patch file, and man page all in the current working directory.
mkdir lzma_alone
cd lzma_alone
tar -xvjf ../lzma465.tar.bz2
find . -name "*.exe" -print0 | xargs -0 rm -f
find . -type f -print0 | xargs -0 chmod 0644
find . -type f -print0 | xargs -0 flip -u
patch -p1 < ../lzma_alone.patch
cd CPP/7zip/Compress/LZMA_Alone
make -f makefile.gcc
cd ../../../..
cd C/LzmaUtil
make -f makefile.gcc
cd ../..
# To install...
sudo cp CPP/7zip/Compress/LZMA_Alone/lzma_alone /usr/local/bin
sudo cp C/LzmaUtil/lzma_minimal /usr/local/bin
sudo cp ../lzma_alone.1 /usr/local/share/man/man1
sudo cp lzma.txt /usr/local/share/doc/lzma_alone.txt
