#!/bin/bash
set -e


./configure --prefix=/usr \
            --disable-static \
            --docdir=/usr/share/doc/xz-"${VERSION}" &&

make &&
make -j1 install &&
mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin &&
mv -v /usr/lib/liblzma.so.* /lib &&
ln -svf ../../lib/"$(readlink /usr/lib/liblzma.so)" /usr/lib/liblzma.so